Linux installer: Fix umask question not working with the recommended install command because stdin is a pipe

This commit is contained in:
Kovid Goyal 2018-04-14 15:44:02 +05:30
parent 3860b3b77e
commit 2373a38005
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -705,6 +705,7 @@ def check_umask():
' this can cause system breakage when running the installer because' ' this can cause system breakage when running the installer because'
' of bugs in common system utilities.' ' of bugs in common system utilities.'
) )
sys.stdin = open('/dev/tty') # stdin is a pipe from wget
while True: while True:
q = raw_input('Should the installer (f)ix the umask, (i)gnore it or (a)bort [f/i/a Default is abort]: ') or 'a' q = raw_input('Should the installer (f)ix the umask, (i)gnore it or (a)bort [f/i/a Default is abort]: ') or 'a'
if q in 'f i a'.split(): if q in 'f i a'.split():