The nvm install|use command achieves switching node versions by updating its running process's PATH environment. Calling nvm_install would only change the node version used by the nvm_install shell process, not the pipeline's process.
Update: Instead of error with "command not found" when the utility is called, it's probably better to print a message about migration. So I added the script back, which now fails with an more helpful message.
[x] I have considered if this change warrants release notes and have added them to the appropriate section in the CHANGELOG.md if necessary.
The
nvm install|use
command achieves switching node versions by updating its running process'sPATH
environment. Callingnvm_install
would only change the node version used by thenvm_install
shell process, not the pipeline's process.In order to change the node.js version used by pipeline's process, we'll need to call the
nvm install|use
bysource
. And that's what https://github.com/Automattic/nvm-buildkite-plugin/pull/3 does.Update: Instead of error with "command not found" when the utility is called, it's probably better to print a message about migration. So I added the script back, which now fails with an more helpful message.
CHANGELOG.md
if necessary.