We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
package.json
{ "name": "npmlock2nix-bug-patchshebangs", "version": "1.0.0", "scripts": { "install": "cross-env echo hello" }, "dependencies": { "cross-env": "*" } }
error
sh: /build/node_modules/.bin/cross-env: /usr/bin/env: bad interpreter: No such file or directory
/build/node_modules/.bin/cross-env is a symlink to /build/node_modules/cross-env/src/bin/cross-env.js
/build/node_modules/.bin/cross-env
/build/node_modules/cross-env/src/bin/cross-env.js
the source file cross-env/src/bin/cross-env.js is NOT patched by patchShebangs (find "$@" -type f -perm -0100) because it is not executable (file mode 0644)
find "$@" -type f -perm -0100
in the preinstall hook, add
preinstall
# patchShebangs will patch only executable files cat package.json | jq -r '. | select(.bin != null) | .bin | values[]' \ | while read binTarget; do chmod +x "$binTarget"; done
maybe avoid jq and use nix to extract a list of binTargets no, this concerns dependencies, where we dont have the json files parsed into nix
jq
The text was updated successfully, but these errors were encountered:
fix: patchShebangs in nonexecutable bin files (nix-community#106)
98c359b
Successfully merging a pull request may close this issue.
package.json
error
/build/node_modules/.bin/cross-env
is a symlink to/build/node_modules/cross-env/src/bin/cross-env.js
the source file cross-env/src/bin/cross-env.js
is NOT patched by patchShebangs (
find "$@" -type f -perm -0100
)because it is not executable (file mode 0644)
solutions
in the
preinstall
hook, addmaybe avoidjq
and use nix to extract a list of binTargetsno, this concerns dependencies, where we dont have the json files parsed into nix
The text was updated successfully, but these errors were encountered: