fix(release): env-bash shebang so release.sh runs on non-FHS systems (NixOS) - #314
Merged
Conversation
release.sh hardcoded '#!/bin/bash', which fails on systems without /bin/bash (e.g. NixOS, where bash lives under /run/current-system/sw/bin). There the script exits with 'bad interpreter: /bin/bash: no such file or directory' and creates no tag — the release silently no-ops (this bit the v0.4.0 cut; it had to be run via an explicit bash path). '#!/usr/bin/env bash' resolves bash via PATH, working on NixOS and standard FHS systems alike. Verified: 'bash -n release.sh' clean; './release.sh' with no args prints usage via the new shebang. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018M9pJSPmG6i1D8s6rpEV4h
ReviewThis is a clean, minimal, correct fix. Code quality / best practices
Potential bugs
Performance
Security
Test coverage
Overall: LGTM. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
release.shstarts with#!/bin/bash. On systems without a/bin/bash— notably NixOS, where bash lives under/run/current-system/sw/bin— running./release.sh <version>fails with:and creates no tag, so the release silently no-ops. This bit the v0.4.0 cut: the script had to be re-run via an explicit
/run/current-system/sw/bin/bash ./release.shto actually tag.Fix
One line:
#!/bin/bash→#!/usr/bin/env bash, which resolves bash viaPATHand works on NixOS and standard FHS systems alike.Verification
bash -n release.sh— syntax clean../release.sh(no args) — prints usage via the new shebang (confirms it resolves).🤖 Generated with Claude Code
https://claude.ai/code/session_018M9pJSPmG6i1D8s6rpEV4h