diff --git a/overlay/usr/local/bin/veilor-installer b/overlay/usr/local/bin/veilor-installer index b957312..4f00fc2 100644 --- a/overlay/usr/local/bin/veilor-installer +++ b/overlay/usr/local/bin/veilor-installer @@ -17,7 +17,10 @@ set -uo pipefail export TERM="${TERM:-linux}" -LOG=/var/log/veilor-installer.log +# Log to /run (pure tmpfs) — /var/log overlays squashfs on the live ISO, so a +# bad sector on the USB medium turns `tee -a` into "input/output error" and +# kills the installer before the menu can render. +LOG=/run/veilor-installer.log # require_tty MUST run before the tee redirect — process substitution # replaces fd1 with a pipe, breaking `[[ -t 1 ]]`. @@ -29,8 +32,12 @@ require_tty() { } require_tty -# Now safe to tee output for log persistence — tty detection already passed. -exec > >(tee -a "$LOG") 2>&1 +# Tee output for log persistence, but only if LOG is writable. On a flaky USB +# the squashfs/overlay can throw I/O errors mid-write — tolerate that and +# keep the installer running without persistence rather than aborting. +if : >> "$LOG" 2>/dev/null; then + exec > >(tee -a "$LOG") 2>&1 +fi # ── Branded styling for gum ───────────────────────────────────────────── # colors.gum sets GUM_* env vars — pure-black palette from veilor-black KDE.