Skip to content

fix: deploy_hosted build exits 1 on success (EXIT trap unbound var) - #22

Merged
mavxdegods merged 1 commit into
mainfrom
fix/build-exit-trap
Jul 30, 2026
Merged

mavxdegods merged 1 commit into
mainfrom
fix/build-exit-trap

Conversation

@mavxdegods

Copy link
Copy Markdown
Member

Follow-up to #20, caught on the first real staged build: build --sha 92eb7d7e7 staged and boot-verified v0.9.1-92eb7d7e7 correctly but then exited 1 — trap 'rm -rf "$scratch"' EXIT defers expansion to script exit, where the function-local scratch is out of scope, so set -u aborts the trap. That would make gen-api-sync record a successful build as blocked, and leaves the scratch dir behind. Fix: expand $scratch when the trap is set.

🤖 Generated with Claude Code

The single-quoted trap read the function-local $scratch after scope exit;
under set -u this turned every successful 'build' into exit 1 and skipped
scratch cleanup. Expand at trap-set time instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mavxdegods
mavxdegods merged commit 8fa8127 into main Jul 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants