-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Explain --no-use in installation instructions #1839
Conversation
README.md
Outdated
@@ -59,6 +59,8 @@ export NVM_DIR="$HOME/.nvm" | |||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |||
``` | |||
|
|||
**Note:** Loading `nvm` is temporarily slow. While we work on a fix, you can add `--no-use` to the end of the above script (...`nvm.sh --no-use`). This will not load nvm until you actually `use` it (which you'll have to do manually, e.g. `nvm use default`). |
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.
I'd prefer to document the feature rather than what it's a workaround for. nvm isn't actually slow for most users; it's an unfortunate and vocal minority that experiences this.
README.md
Outdated
@@ -59,6 +59,8 @@ export NVM_DIR="$HOME/.nvm" | |||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |||
``` | |||
|
|||
**Note:** You can add `--no-use` to the end of the above script (...`nvm.sh --no-use`) to postpone using `nvm` until you manually `use` it (e.g. `nvm use default`). |
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.
or just nvm use
by itself :-)
This is great tho, I'll tweak and squash it prior to merging.
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.
I saw you mention nvm use
, but I get an error saying No .nvmrc file found
followed by the nvm help
output. My understanding is that the rc file needs to be created manually, so nvm use
won't apply to all users.
Also, I'm happy to squash myself, if helpful. Guessing you want a single commit with a better commit message? Can make any other changes too. I'm no surgeon with rebase, but I'm pretty dangerous 😉.
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.
nvm use
also uses the default if available; nvm use default
won't actually work for all users either.
nvm use node
will work if there's a version installed - if not, nvm install node
will both install and use node. I don't think there's a one-size-fits-all command, so maybe something generic that links to the usage section?
I'd probably go with the same commit message but prefixed with [Docs]
:-)
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.
Linked to usage. Let me know when satisfied with changes and then I'll squash and prefix with [Docs]
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.
Thanks! Please rebase this down to 1 commit on latest master; or if not I'm happy to do it for you as part of merging.
Opened PR #1840! Exciting to contribute to nvm, thanks for your support. I decided to skip the rebase and just checkout the file from the other branch and commit to master. Is that a good workflow?
|
No, the better workflow is never to open another PR. Can you please reopen this one? |
I'm not going to merge this or #1840 until this is reopened; orphaned PR refs are an abomination. |
So sorry, didn't realize I could change the target branch to master! Can you help me figure out how to do that? Otherwise I can just squash down to one commit on the patch-1 branch? |
What was needed originally was to rebase the patch-1 branch and force push it. I've just force pushed your commit from #1840 to your patch-1 branch, so the two match, and I'll now merge them both at the same time. |
Got it. So I should've kept everything on the same branch within the same PR.
I got confused by "master" but now realize you meant to be sure and pull down all the latest changes from master into my patch-1 branch (in case there were any commits since my last pull) before rebasing and squashing/fixing up the commits. Thanks for explaining and for all of your help! 🙏 |
No description provided.