install.sh: use /dev/tty only when it can be opened
Browse files- install.sh +1 -1
install.sh
CHANGED
|
@@ -39,7 +39,7 @@ for f in files:
|
|
| 39 |
print(f"Downloaded {len(files)} files.")
|
| 40 |
PY
|
| 41 |
cd "$dest"
|
| 42 |
-
if
|
| 43 |
bash setup.sh </dev/tty # piped from curl: setup's questions (sudo) read the terminal
|
| 44 |
else
|
| 45 |
bash setup.sh
|
|
|
|
| 39 |
print(f"Downloaded {len(files)} files.")
|
| 40 |
PY
|
| 41 |
cd "$dest"
|
| 42 |
+
if { : </dev/tty; } 2>/dev/null; then # a real terminal: setup can ask for the sudo password
|
| 43 |
bash setup.sh </dev/tty # piped from curl: setup's questions (sudo) read the terminal
|
| 44 |
else
|
| 45 |
bash setup.sh
|