Skip to content

fix(installer): hoist tarball var to script-global so EXIT trap is safe#34

Merged
chr1syy merged 1 commit into
mainfrom
fix/installer-tarball-trap
May 7, 2026
Merged

fix(installer): hoist tarball var to script-global so EXIT trap is safe#34
chr1syy merged 1 commit into
mainfrom
fix/installer-tarball-trap

Conversation

@chr1syy
Copy link
Copy Markdown
Collaborator

@chr1syy chr1syy commented May 7, 2026

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 when main returns, and set -u prints tarball: unbound variable after "Install complete".

Promoting tarball to a script-global RELEASE_TARBALL alongside the existing RELEASE_BACKUP is the smallest fix that keeps both success and failure paths clean.

Test plan

  • Pre-flight: ran patched install.sh in /tmp/relay-fresh3, install completes silently with no trailing warning
  • Existing tests still pass on main baseline (no test code touched)
  • After merge: tag v0.1.2, run fresh-install dry-run against the published tarball, confirm no unbound variable warnings end-to-end

🤖 Generated with Claude Code

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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Warning

Rate limit exceeded

@chr1syy has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 53 minutes and 1 second before requesting another review.

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c6eed2ff-a992-4ef8-bbdf-ae0a153c1471

📥 Commits

Reviewing files that changed from the base of the PR and between 8f5331e and 617f165.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • install.sh
  • package.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/installer-tarball-trap

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chr1syy chr1syy merged commit 399ff4d into main May 7, 2026
3 checks passed
@chr1syy chr1syy deleted the fix/installer-tarball-trap branch May 7, 2026 05:43
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.

1 participant