-
Notifications
You must be signed in to change notification settings - Fork 164
Reshim only when needed #118
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
Reshim only when needed #118
Conversation
8d21c0f to
d35af84
Compare
|
Wondering whether there are plans to merge this, or is there another solution to |
bin/postinstall
Outdated
| if [ "$ASDF_SKIP_RESHIM" == "1" ]; then | ||
| echo "Run 'asdf reshim nodejs ${ASDF_INSTALL_VERSION:-$npm_config_node_version}' after installing the packets to reshim" | ||
| else | ||
| elif [ `/usr/bin/env | grep "npm_package_bin"` ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to replace this line with elif /usr/bin/env | grep -q "npm_package_bin_"; then for it to work.
|
@minusfive You can add this to |
|
I am not very familiar with this functionality, so I can't really review this PR for correctness. If any other contributors to asdf-nodejs have any thoughts on this please let me know. |
|
This seems to work correctly. If @surajbarkale suggestion is included and merge conflicts are resolved, I'd vote for merging this. |
|
The documentation is here, it only adds Would be better if the reshim only occurred after the last install, I will see if something can be done about that. The reshimming only on binaries is a advance anyways, @lukaselmer can you solve the issues with the PR? Or can we open another one? |
|
#197 does something similar, but uses |
d35af84 to
ef5effb
Compare
|
@augustobmoura I resolved the merge conflict, and I like #197 👍 |
|
After changing the auto reshim mechanism in #232, this PR is probably deprecated. Thanks for the work anyways @lukaselmer! |
I didn't find any documentation about the env variablenpm_package_bin_*, but it seems that it is alwaysnpm_package_bin_<bin_name>, e.g.npm_package_bin_prettierfor the packageprettier