Skip to content

Commit

Permalink
Speed up npm global installs
Browse files Browse the repository at this point in the history
Per issue #46 the `ASDF_INSTALL_VERSION` variable is not available in global NPM installs. Instead the `npm_config_node_version` is provided by NPM during this situation.

This change offers a fallback in these cases. Since a version will be available this will significantly speed up the postinstall during global NPM installs.

Fixes #46
  • Loading branch information
sukima authored Nov 7, 2018
1 parent ccbbf35 commit d18287b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/postinstall
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

asdf reshim nodejs "$ASDF_INSTALL_VERSION"
asdf reshim nodejs "${ASDF_INSTALL_VERSION:-$npm_config_node_version}"

0 comments on commit d18287b

Please sign in to comment.