installer: tolerate missing tty in offline finalizer
This commit is contained in:
@@ -89,7 +89,6 @@ catch_errors() {
|
||||
stop_log_output
|
||||
|
||||
if [[ -n ${OMARCHY_CHROOT_FINALIZER:-} ]]; then
|
||||
show_cursor
|
||||
{
|
||||
echo "Omarchy installation stopped inside offline finalizer."
|
||||
echo "This command halted with exit code $exit_code:"
|
||||
@@ -168,7 +167,7 @@ exit_handler() {
|
||||
catch_errors "$exit_code"
|
||||
else
|
||||
stop_log_output
|
||||
show_cursor
|
||||
[[ -n ${OMARCHY_CHROOT_FINALIZER:-} ]] || show_cursor
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ fi
|
||||
|
||||
# Get terminal size from /dev/tty (works in all scenarios: direct, sourced, or piped)
|
||||
if [[ -e /dev/tty ]]; then
|
||||
TERM_SIZE=$(stty size 2>/dev/null </dev/tty)
|
||||
TERM_SIZE=$(stty size 2>/dev/null </dev/tty || true)
|
||||
|
||||
if [[ -n $TERM_SIZE ]]; then
|
||||
export TERM_HEIGHT=$(echo "$TERM_SIZE" | cut -d' ' -f1)
|
||||
|
||||
Reference in New Issue
Block a user