-
-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(core): only install node on Windows if not available #12772
Conversation
This fixes the build on my Windows machine. Previously `nvm install/use` for whatever reason caused Windows no longer be able to find `node` thus causing the build to fail. This change when run on Windows first checks the current node version and installs it only if it is not installed.
User Test ResultsTest specification and instructions User tests are not required |
Hmm. Are you using |
Yes, I'm using Here's the output of a failing build after running
|
Adding |
This solves the underlying problem of builds not working on my machine. Seems the environment isn't fully set after calling `nvm use`, so we have to either `sleep 1` or wait for the process to end (which this change does).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is probably related to elevation -- the elevation cycle probably breaks the wait on nvm.exe so it proceeds to the next command in the script. This is an adequate patch, may be worth persevering on the symlink configuration to avoid elevation.
cross ref on coreybutler/nvm-windows#1183 |
Co-authored-by: Marc Durdin <[email protected]>
Changes in this pull request will be available for download in Keyman version 18.0.154-alpha |
This fixes the build on my Windows machine. Previously
nvm install/use
for whatever reason caused Windows to no longer be able to findnode
thus causing the build to fail. Waiting fornvm use
to finish solves the build failure. This change when run on Windows additionally first checks the current node version and installs and activates it only if it is not installed.@keymanapp-test-bot skip