Skip to content
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

[CLI] call nvm use before each npm call on CI #220

Merged
merged 5 commits into from
Nov 8, 2023
Merged

[CLI] call nvm use before each npm call on CI #220

merged 5 commits into from
Nov 8, 2023

Conversation

jhnstn
Copy link
Member

@jhnstn jhnstn commented Nov 8, 2023

While testing the prepare command in a Github workflow I noticed that any call to exec.Command seemed to run in a separate process.
The result is that nvm needs to be ran before each npm command. Without that the workflow falls back to the default system node.

Testing

The real test is to see if the changes work on a github workflow but we can test locally to make sure it's working.

Steps to check locally:

  • Create a build to some empty directory e.g. go build ~/some-test-directory/gbm-cli
  • cd into that directory and create a new empty directory gb
  • From the directory created in the last step run CI=true ../gbm-cli release prepare gb {version} --no-tag
  • Confirm that command succeeds

Copy link
Contributor

@derekblank derekblank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! LGTM. 🚀

@jhnstn jhnstn merged commit 0001131 into trunk Nov 8, 2023
2 checks passed
@jhnstn jhnstn deleted the cli/npm branch November 8, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants