mirror of
https://github.com/Lakr233/vphone-cli.git
synced 2026-09-05 09:04:27 +00:00
boot_preflight: skip /dev/tty fallback without a tty (#225)
This commit is contained in:
@@ -82,6 +82,9 @@ RESEARCH_GUEST_STATUS="$(
|
||||
fi
|
||||
fi
|
||||
# No Macintosh HD found, or auto-select failed — prompt interactively
|
||||
# only when a controlling TTY exists. Non-interactive runs should degrade
|
||||
# cleanly instead of failing on /dev/tty access under set -e.
|
||||
if { : >/dev/tty; } 2>/dev/null; then
|
||||
printf '%s\n' "$_out" >/dev/tty
|
||||
printf 'Pick a macOS installation: ' >/dev/tty
|
||||
read _choice </dev/tty
|
||||
@@ -91,6 +94,9 @@ RESEARCH_GUEST_STATUS="$(
|
||||
else
|
||||
echo 'unavailable'
|
||||
fi
|
||||
else
|
||||
echo 'unavailable (multiple installs; no interactive tty)'
|
||||
fi
|
||||
fi
|
||||
)"
|
||||
CURRENT_BOOT_ARGS="$(sysctl -n kern.bootargs 2>/dev/null || true)"
|
||||
|
||||
Reference in New Issue
Block a user