diff --git a/assets/installer.py b/assets/installer.py index a2154877..541281b0 100755 --- a/assets/installer.py +++ b/assets/installer.py @@ -45,8 +45,9 @@ SILENT = ( not in ("", "0", "off", "false") ) -if not IS_WIN: - sys.stdin = open("/dev/tty", "r") +if not os.isatty(sys.stdin.fileno()): + # the script is being piped, we need to reset stdin + sys.stdin = open("CON:" if IS_WIN else "/dev/tty") if sys.version_info.major == 2: input = raw_input