fix(installer): hoist tarball var to script-global so EXIT trap is safe#34
Conversation
v0.1.1 fixed the staging-cleanup RETURN trap leak; running the v0.1.1 installer in a sandbox revealed the same scoping bug for the tarball EXIT trap. The local 'tarball' is gone by the time the trap fires when main returns, so 'set -u' prints "tarball: unbound variable" after "Install complete". Promote tarball to a script-global RELEASE_TARBALL alongside RELEASE_BACKUP and reference it from the trap. Pre-flight test in /tmp/relay-fresh3: install completes silently with no trailing warning. Bump to 0.1.2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
To continue reviewing without waiting, purchase usage credits in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
PR #33 fixed the RETURN-trap leak on
\$staging. Re-running the v0.1.1 installer in a sandbox surfaces the same scoping bug on the EXIT trap for\$tarball— the local declaration is gone by the time the trap fires whenmainreturns, andset -uprintstarball: unbound variableafter "Install complete".Promoting
tarballto a script-globalRELEASE_TARBALLalongside the existingRELEASE_BACKUPis the smallest fix that keeps both success and failure paths clean.Test plan
install.shin/tmp/relay-fresh3, install completes silently with no trailing warningmainbaseline (no test code touched)v0.1.2, run fresh-install dry-run against the published tarball, confirm nounbound variablewarnings end-to-end🤖 Generated with Claude Code