Prior to this change the `tee` call was susceptible to its output being closed causing the pipeline to exit with `SIGPIPE`. This change replaces `tee` with two parts.
1. Write directly to `"$index_file"`
2. `cat` the contents of `"$index_file"` to `stdout`.
This way, if the receiving side of the pipe exits, `cat` will exit without impacting the index cache
Reimplements #264
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.
* feat: Implement index tab cache
* feat: Switch to etag-based caching
* Update lib/utils.sh
Co-authored-by: Augusto Borges de Moura <augusto.borgesm@gmail.com>
Co-authored-by: Trevor Brown <Stratus3D@users.noreply.github.com>