-
Notifications
You must be signed in to change notification settings - Fork 242
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
wp-now: Remove unnecessary nvm calls #454
Conversation
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.
❤️
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.
❤️
export NVM_DIR=$HOME/.nvm; | ||
source $NVM_DIR/nvm.sh; | ||
nvm use | ||
|
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.
Do we need to have a node version check? What happens if your default node version is insufficient?
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.
Do we need to have a node version check?
I consider this bin script as a wrapper, a helper that allows running commands similarly to when installed via npm. I wouldn't add any validation logic here, then.
What happens if your default node version is insufficient?
In such a case, I would expect behavior to be the same as for a user who runs npx nx preview wp-now
without a wrapper.
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.
+1 for removing nvm
dependency – it prevents people don't use nvm
from running this script even if they still have the required Node.js version. @luisherranz expects that to be the case at his WCEU workshop
Closing in favor of WordPress/playground-tools#44 |
What?
In this diff, I propose to remove unnecessary nvm calls from the script that allows running wp-now for development purposes
globally.
Why?
bin/
doesn't make changes on the machine when it runsRelated ticket: WordPress/playground-tools#7
How?
I removed the affected code. We still recommend running
nvm use
in contribution docs, but the user can skip that if wanted to manage node versions in another way.Testing Instructions