Rustup simply dies with the error message "/dev/tty does not exist" when a TTY isn't available. This is particularly troublesome when its run as part of e.g. a cron job, CI system, or vagrant script.
It dies with a particularly unhelpful message:
info: downloading installer
./rustup.sh: 79: ./rustup.sh:
cannot open /dev/tty: No such device or address
Looking at the script, that corresponds to:
# The installer is going to want to ask for confirmation by
# reading stdin. This script was piped into `sh` though and
# doesn't have stdin to pass to its children. Instead we're going
# to explicitly connect /dev/tty to the installer's stdin.
if [ ! -e "/dev/tty" ]; then
err "/dev/tty does not exist"
fi
There's no way to know what's wrong or how to fix it without actually reading the script. AFAICT there's no way to proceed without a TTY other than accepting the defaults since no other options are accepted or env variables checked. So that error message could read something like:
err "/dev/tty not available, prompts unavailable. Run with '-y' to accept defaults"
Rustup simply dies with the error message "/dev/tty does not exist" when a TTY isn't available. This is particularly troublesome when its run as part of e.g. a cron job, CI system, or vagrant script.
It dies with a particularly unhelpful message:
Looking at the script, that corresponds to:
There's no way to know what's wrong or how to fix it without actually reading the script. AFAICT there's no way to proceed without a TTY other than accepting the defaults since no other options are accepted or env variables checked. So that error message could read something like: