Skip to content

Commit 13f21bc

Browse files
committed
fix: guard exec < /dev/tty with || true for set -e safety
exec < /dev/tty can fail even when the file exists (e.g. "Device not configured"). Under set -e this kills the script. Add || true so the script falls through gracefully.
1 parent 652d37f commit 13f21bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/server/install-script.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ set -e
1616
# When run via "curl | bash", stdin is the script content, not the terminal.
1717
# Reopen stdin from /dev/tty so interactive prompts (sudo, Homebrew) work.
1818
if [ ! -t 0 ] && [ -e /dev/tty ]; then
19-
exec < /dev/tty
19+
exec < /dev/tty || true
2020
fi
2121
2222
echo "========================================"
@@ -101,7 +101,7 @@ set -e
101101
# When run via "curl | bash", stdin is the script content, not the terminal.
102102
# Reopen stdin from /dev/tty so interactive prompts (sudo, Homebrew) work.
103103
if [ ! -t 0 ] && [ -e /dev/tty ]; then
104-
exec < /dev/tty
104+
exec < /dev/tty || true
105105
fi
106106
107107
echo "========================================"

0 commit comments

Comments
 (0)