Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shebang: changed scripts shebang to better support systems like bsd and nixos #306

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lromor
Copy link

@lromor lromor commented Jan 16, 2025

The assumption that bash is always located at /bin/bash does not always hold true.
In POSIX systems, it is recommended to avoid relying on common paths. Instead, one should either:

  • Hardcode the full absolute path to the executable, or
  • Locate the command in the PATH.

A more portable approach is to use #!/usr/bin/env bash, which resolves binaries through the PATH.

This patch updates the default shebang string in this repository to improve portability on systems like NixOS or BSD.

@hzeller
Copy link

hzeller commented Jan 16, 2025

Nice! This will unbreak systems that behave Posix-correctly and don't have bash in /bin.

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