Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to installing node on Windows using NVS rather than NVM. NVS is not installed by default, so use Chocolatey to install it. NVM currently has two shortcomings that make it difficult to use in automation. "nvm install 16 && nvm use 16" doesn't work because "use" appears to need an exact patch version specified, which would involve parsing the output of "install" or of "list" since we only lock to major verisons. coreybutler/nvm-windows#708 "nvm use" and "nvm install" both give successful exit statuses even when they fail with an error message. This meant that when we did "nvm use 16", it failed because of the above bug, but the job kept on running and used the default version of Node installed in the image. Working around this would again involve parsing output. coreybutler/nvm-windows#738 In my testing, NVS appears to have neither of these problems. I had also considered installing Node directly via Chocolatey, but Chocolatey does not yet support installing particular versions unless the packager has appended the version number to the name. This also implies that likely only the latest major version gets updates.
- Loading branch information