wordpress-mobile / release-toolkit-gutenberg-mobile

Automation Scripts for Releasing Gutenberg-Mobile Updates to the WordPress Mobile Apps.
Mozilla Public License 2.0
5 stars 2 forks source link

[CLI] Fix logic to load nvm when calling npm commands #240

Closed jhnstn closed 5 months ago

jhnstn commented 6 months ago

The script will set up nvm on every npm call when running on CI (source).

The issue is that Go runs commands with /bin/bash by default so unless nvm is set up to run in bash, the npm calls that the script makes will not load nvm and fall back to the systems global node/npm.

Locally the fix is to make sure that nvm is set up to work with bash by adding the "nvm snippet" to ~/.bash_profile