Skip to content

Use portable shebang across all shell scripts#49

Closed
Emin017 wants to merge 2 commits intoPolyArch:mainfrom
Emin017:emin/fix-shebang
Closed

Use portable shebang across all shell scripts#49
Emin017 wants to merge 2 commits intoPolyArch:mainfrom
Emin017:emin/fix-shebang

Conversation

@Emin017
Copy link
Copy Markdown

@Emin017 Emin017 commented Mar 17, 2026

Replace hardcoded #!/bin/bash with #!/usr/bin/env bash for better portability across different Unix systems where bash may be installed in non-standard locations.

Replace hardcoded #!/bin/bash with #!/usr/bin/env bash for better portability across different Unix systems where bash may be installed in non-standard locations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Emin017
Copy link
Copy Markdown
Author

Emin017 commented Mar 17, 2026

I opened this because I couldn’t run humanize on NixOS: the scripts assumed /bin/bash, but that path does not exist on NixOS, so execution failed. Replacing it with #!/usr/bin/env bash solved the problem on my side and should be a more portable choice in general. It does not change script logic; it only avoids relying on a hardcoded Bash location.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SihaoLiu added a commit that referenced this pull request Mar 29, 2026
Replace #!/bin/bash with #!/usr/bin/env bash for better portability
across different Unix systems (e.g. NixOS) where bash may be installed
in non-standard locations. Also fix remaining shebangs in files added
after the original PR was created.

Includes prepare_runtime_bin() helper for test PATH isolation.
@SihaoLiu
Copy link
Copy Markdown
Contributor

Merged into dev branch via local merge (commit 03e159c). Shebang changes applied to all scripts including files added after this PR was created.

@SihaoLiu SihaoLiu closed this Mar 29, 2026
@SihaoLiu SihaoLiu mentioned this pull request Mar 29, 2026
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