Skip to content

Commit

Permalink
Only redirect from /dev/tty if stdin is not already a tty
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceManiac committed Feb 19, 2022
1 parent b694b1a commit 35fc16c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rustup-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ main() {
exit 1
fi

if [ "$need_tty" = "yes" ]; then
if [ "$need_tty" = "yes" ] && [ ! -t 0 ]; then
# 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
Expand Down

0 comments on commit 35fc16c

Please sign in to comment.