Skip to content

Conversation

@kylecarbs
Copy link
Member

Replace hardcoded /bin/bash shebangs with /usr/bin/env bash for better portability across different systems, particularly NixOS where /bin/bash does not exist.

Changes

  • Makefile: Update SHELL variable for non-Windows systems
  • docs/init-hooks.md: Update example script shebangs (2 occurrences)
  • scripts/setup-macos-signing.sh: Update shebang
  • vscode/scripts/create-icon.sh: Update shebang

Why

/usr/bin/env bash resolves bash from PATH, making scripts work on systems where bash is not in /bin (e.g., NixOS installs bash in /nix/store/...). This is a standard practice for portable shell scripts.

Generated with mux

Replace hardcoded /bin/bash shebangs with /usr/bin/env bash for better
portability across different systems, particularly NixOS where /bin/bash
does not exist.

Changes:
- Makefile: Update SHELL variable for non-Windows systems
- docs/init-hooks.md: Update example script shebangs
- scripts/setup-macos-signing.sh: Update shebang
- vscode/scripts/create-icon.sh: Update shebang

/usr/bin/env bash resolves bash from PATH, making scripts work on systems
where bash is not in /bin (e.g., NixOS installs bash in /nix/store/...).

_Generated with `mux`_
Restore and expand the Windows-specific context that was removed,
explaining why we use different SHELL values for different platforms.
@kylecarbs kylecarbs merged commit 0683424 into main Nov 14, 2025
15 checks passed
@kylecarbs kylecarbs deleted the bash-env-standard branch November 14, 2025 20:17
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