You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently trialing nixos, and have encountered a script portability problem: the shebang being used in this project will not resolve to a sh binary because sh isn't present at the assumed path /bin/sh.
Researching shebangs and portability, I have found that #! /usr/bin/env sh is considered to be the most portable. In basic terms, this shebang uses /usr/bin/env to check the locations in the $PATH variable for sh. This means that, so long as sh is available in a users' $PATH, it will find and run the correct binary.
I was going to fork and make a pull request, but I imagine that a pull request touching every single script in this repository is likely to cause problems with other dev's working trees when they try and merge their changes, hence this being raised as an issue instead. If I am mistaken, I will happily fork and create a pull request for this change.
The text was updated successfully, but these errors were encountered:
I'm currently trialing nixos, and have encountered a script portability problem: the shebang being used in this project will not resolve to a
sh
binary becausesh
isn't present at the assumed path/bin/sh
.Researching shebangs and portability, I have found that
#! /usr/bin/env sh
is considered to be the most portable. In basic terms, this shebang uses/usr/bin/env
to check the locations in the$PATH
variable forsh
. This means that, so long assh
is available in a users'$PATH
, it will find and run the correct binary.I was going to fork and make a pull request, but I imagine that a pull request touching every single script in this repository is likely to cause problems with other dev's working trees when they try and merge their changes, hence this being raised as an issue instead. If I am mistaken, I will happily fork and create a pull request for this change.
The text was updated successfully, but these errors were encountered: