-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
nvm: copied nvm-exec doesn't work, etc #43795
Comments
This all sounds good to me. Adding a caveat about If the bash completion issue is one of bad documentation, I'd suggest just opening a PR upstream to fix it. |
Yep, I'll test. Pretty sure it remains, because this is a basic design feature of NVM: it expects to be updated in-place, not to have versioned installs.
I'll open a PR upstream to fix the wording. But I think we need to note it in Homebrew regardless because the formula relocates Will put together a PR once I've tested the upgrade behavior. |
Wanted to deal with the version update, so jumped on a lot of the issues raised here as well in #44394. Re the upgrade situation, confirmed:
Post
Feel free to chase me in on this. I loathe dealing with completions so didn't tweak that in the PR. |
Looks like the caveats automatically contain a note about bash completion when displayed after it has been installed. That seems sufficient.
|
(A couple issues I ran in to with the
nvm
formula. I can do a PR for any/all of these if you're interested.)In the caveats for
nvm
, it tells you to copynvm-exec
to your~/.nvm
"working directory".The copied
nvm-exec
doesn't work, at least under the current version of NVM. From what I can tell,nvm-exec
expects to live in NVM's runtime/installation dir and havenvm.sh
immediately next to it; not to be in the data/working$NVM_DIR
directory.It also seems like downloading
nvm-exec
separately as a resource is redundant, since the NVM distribution containsnvm-exec
(at least in the current version), and it's already mode755
. (Thenvm-exec
stuff was added in 23e2497.)I'd like to remove the caveats about copying
nvm-exec
, and try doing the install without a separatenvm-exec
resource. Anything I'm overlooking here?Upgrades
If the user doesn't set
$NVM_DIR
(which defaults to using the NVM installation directory as the data/working directory, too), will NVM upgrades still lose their existing NVM-managed Node installs? Seems like yes, sincebrew
is installing NVM to a versioned directory. Should we add a note about that in the caveats? Or do something about setting a different default$NVM_DIR
? Otherwise, if users don't do the additional installation steps, it looks like things will seem to work fine, but then their Node installs will disappear some day when they do abrew update; brew upgrade
.Misc
Couple other minor points on
nvm
:$HOME
nvm.sh
should probably bechmod -x
since it is only intended forsource
-ing, and is useless if run as a standalone script/command.bash
completions to caveats, too? That requires an explicit user configuration change (nvm.sh
doesn't do it for you), and it appears misdocumented on the NVM repo. (It tells you to source it from the$NVM_DIR
data/working dir, which only works if you're letting that default to the NVM runtime installation directory, which Homebrew does not do if you've followed the instructions in the caveats. And Homebrew relocates NVM'sbash_completion
anyway, so it needs custom instructions.)The text was updated successfully, but these errors were encountered: