Use /bin/bash in shebang for better cross-system compatibility#21
Use /bin/bash in shebang for better cross-system compatibility#21tatsumoto-ren merged 2 commits intoAjatt-Tools:mainfrom
/bin/bash in shebang for better cross-system compatibility#21Conversation
|
Hello! Yes, I don't know why we use
I also use |
/usr/bin/env bash in shebang for better cross-system compatibility/bin/bash in shebang for better cross-system compatibility
|
Thanks, this is definitely an improvement 👍 One concern with On macOS, Using |
I see. Do you think
I think #17 can't be accepted as is because it removes some really handy bash-isms. I would rather try to find a way to run the latest version of GNU bash on macOS. The question is, does We could add this check to impd so it doesn't run on old Bash versions: |
|
I ran a few benchmarks on my system, and the difference between
On macOS, adding the Homebrew prefix to The Bash version check you suggested is a good idea as long as impd continues to depend on Bash 5+ features. |
Not all UNIX-based systems have Bash at
/usr/bin/bash. On some Linux distributions and macOS, it may be located elsewhere (such as/bin/bash). Using/usr/bin/env bashlets the system find Bash viaPATH, so the script runs more reliably across environments.This change is also relevant to pull request #17, which aims to improve cross-platform compatibility (including environments where GNU tools or newer Bash versions may not be available by default).