Automattic / a8c-ci-toolkit-buildkite-plugin

A caching plugin that can be invoked from your build script.
21 stars 5 forks source link

Remove nvm_install and recommend using nvm-buildkite-plugin #73

Closed crazytonyli closed 1 year ago

crazytonyli commented 1 year ago

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.

In order to change the node.js version used by pipeline's process, we'll need to call the nvm install|use by source. 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.