From ce07e55e9815642723a06bf7f844c6ef46b0fbfa Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Sat, 4 Jul 2026 14:24:25 +0200 Subject: [PATCH] =?UTF-8?q?fix(update):=20TTY-guard=20the=20gstack=20promp?= =?UTF-8?q?t=20=E2=80=94=20non-interactive=20runs=20died=20at=20EOF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RC fix (soak day 1, #3). `read -r` on the "Proceed with GStack update?" prompt hits EOF in any non-TTY run (cron, CI, background shell) and kills the whole update under set -e — every later step (rtk, gsd, ctx7, semgrep, npx skills) silently never ran. Guard on [ -t 0 ]: interactive behavior unchanged, non-TTY defaults to the safe N and continues. Proven end-to-end: before = Error 1 at the prompt; after = full run exit 0 through step 7.5. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01XpphkdTosUzokBDNG7PToS --- update-all.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/update-all.sh b/update-all.sh index ba40d72..b7063f1 100644 --- a/update-all.sh +++ b/update-all.sh @@ -65,8 +65,16 @@ echo "" echo "── Updating GStack submodule..." warn "GStack tracks branch = main (no commit hash). Review upstream commits before updating." echo "" -printf " Proceed with GStack update? [y/N] " -read -r _gstack_confirm +# TTY guard: in a non-interactive run (cron, CI, background shell) `read` +# hits EOF and dies under set -e — the whole update aborted mid-script. +# Default to the safe N and keep going; interactive behavior unchanged. +if [ -t 0 ]; then + printf " Proceed with GStack update? [y/N] " + read -r _gstack_confirm +else + info "Non-interactive run — skipping GStack update (run in a terminal to be prompted)" + _gstack_confirm="n" +fi if [[ "$_gstack_confirm" =~ ^[Yy]$ ]]; then # Capture gstack state before the update so we can restore it after # ./setup runs (setup re-creates every symlink; without this, an