If not set, [node-build defaults to a timestamped subdirectory of
`TMPDIR`](https://github.com/nodenv/node-build#custom-build-configuration),
which is exactly what we need.
This fixes https://github.com/asdf-vm/asdf-nodejs/issues/289
With this change, I see repeated builds fail in the exact same way (see
https://github.com/asdf-vm/asdf-nodejs/issues/289 for a detailed
explanation of what used to happen):
$ PATH="$PWD:$PATH" ASDF_NODEJS_FORCE_COMPILE=1 asdf install nodejs 14.18.1
Trying to update node-build... ok
WARNING: node-v14.18.1 is in LTS Maintenance mode and nearing its end of life.
It only receives *critical* security updates, *critical* bug fixes and documentation updates.
Installing node-v14.18.1...
BUILD FAILED (Arch rolling using node-build 4.9.69)
Inspect or clean up the working tree at /tmp/node-build.20220216023317.178521.tZF5cV
Results logged to /tmp/node-build.20220216023317.178521.log
Last 10 log lines:
/tmp/node-build.20220216023317.178521.tZF5cV ~/tmp/demoing
/tmp/node-build.20220216023317.178521.tZF5cV/node-v14.18.1 /tmp/node-build.20220216023317.178521.tZF5cV ~/tmp/demoing
Node.js configure: Found Python 3.9.6...
WARNING: C compiler (CC=gcc, 0.0.0) too old, need gcc 4.2 or clang 3.2
WARNING: Could not recognize `gas`:
ERROR: Did not find a new enough assembler, install one or build with
--openssl-no-asm.
Please refer to BUILDING.md
$ PATH="$PWD:$PATH" ASDF_NODEJS_FORCE_COMPILE=1 asdf install nodejs 14.18.1
Trying to update node-build... ok
WARNING: node-v14.18.1 is in LTS Maintenance mode and nearing its end of life.
It only receives *critical* security updates, *critical* bug fixes and documentation updates.
Installing node-v14.18.1...
BUILD FAILED (Arch rolling using node-build 4.9.69)
Inspect or clean up the working tree at /tmp/node-build.20220216023335.178790.u0kcPV
Results logged to /tmp/node-build.20220216023335.178790.log
Last 10 log lines:
/tmp/node-build.20220216023335.178790.u0kcPV ~/tmp/demoing
/tmp/node-build.20220216023335.178790.u0kcPV/node-v14.18.1 /tmp/node-build.20220216023335.178790.u0kcPV ~/tmp/demoing
Node.js configure: Found Python 3.9.6...
WARNING: C compiler (CC=gcc, 0.0.0) too old, need gcc 4.2 or clang 3.2
WARNING: Could not recognize `gas`:
ERROR: Did not find a new enough assembler, install one or build with
--openssl-no-asm.
Please refer to BUILDING.md
Prior to this change the awk 'prog' contained an exit command. When tee attempted to write to the stdout at this point, it received a SIGPIPE signal and exited with an error code of 141. I can't seem to find a way to have tee ignore this signal, but I don't believe the overhead of awk doing a small comparison will have a large/any performance impact especially relative to the processing in filter_version_candidates
Fixes#263
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>
If you haven't imported the necessary PGP keys, the installer will print an error about "bootstrapping trust" and direct you to the README. However, the words "bootstrap" and "trust" never appear in the README.
This adjusts the warning to include some words that you can actually search the README for.
'command' is a shell builtin on all current shells
'which' is not builtin to bash, and if the node 'which' package is installed, that package may interfere
See https://github.com/asdf-vm/asdf-nodejs/issues/137 for an example of that interference