Commit Graph

12 Commits

Author SHA1 Message Date
Augusto Moura
379112e1ec
fix: add a cleanup postinstall
To remove the older mechanism of auto-reshimming in already existing
installations
2021-07-19 20:23:40 -03:00
Augusto Moura
6ddcdfdb81
refactor(auto-reshim): add npm wrapper and remove npm hooks
Instead of relying in npm global installation hook for auto reshimming,
a pretty obscure functionality of npm, I just wrote a wrapper script
that intercept calls for npm and invokes asdf reshim whenever necessary.

The wrapper needs to be configured manually by the user, following the
practices of other plugins with similar settings.

I also wrote an utility for printing the current wrapper path easing the
configuration of new environments.

README now has an example of how to configure auto-reshimming.

There's also a notice on plugin installation about setting up the
auto-reshimming configuration.

A notice was also added to the install command, so that we reach more
people about the changes.
2021-05-16 21:06:10 -03:00
Trevor Brown
c975636239 Remove hardcoded plugin name and replace with variable
Fixes issue #20
2020-01-14 09:54:39 -05:00
Rohan Talip
b48c4bcffd
Updated postinstall to fix typo 2019-06-03 13:18:07 -07:00
Lukas Elmer
441d9f857e
add option to temporarily disable reshimming 2019-01-23 19:02:33 +01:00
Devin Weaver
d18287b041
Speed up npm global installs
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
2018-11-07 11:09:35 -05:00
Trevor Brown
c8f4518fc0
asdf reshim expects a plugin name and version. 2018-02-19 15:01:26 -05:00
Victor Borja
31e60f839f Set executable bit for postinstall 2017-09-04 03:33:00 -05:00
Daniel Perez
d182dca840 Use list-bin-paths instead of custom hook 2017-08-19 14:34:09 +09:00
Akash Manohar J
7cf59c1454 Move the hook script from python to node.js
Some environments like containers don't have Python installed.
2016-01-05 11:27:03 +05:30
Akash Manohar J
ec1aca10ba Fix bin names #6 2015-12-22 22:35:59 +05:30
Akash Manohar J
ae6b6ff9e4 Centralized postinstall hook #3 2015-12-22 22:35:35 +05:30