Recommend installing nvm in ~/.nvm #211

Closed
wants to merge 1 commit into
from

Projects

None yet

5 participants

@olivierlacan

The README oddly recommends to install nvm inside of ~/nvm which goes against conventions. It makes more sense to install tools like nvm in hidden home directories.

Oddly enough the existing README also claims that the shell script installation method puts nvm inside of ~/.nvm. In the case, why do the manual installation instructions differ?

It's also best to use the source command explicitly instead of its . alias so that more people (even if they don't know bash scripting well) understand what the command does.

@olivierlacan olivierlacan Recommend installation in hidden ~/.nvm directory
The README oddly recommends to install nvm inside of `~/nvm` which goes against conventions. It makes more sense to install tools like nvm in hidden home directories.

It's also best to use the `source` command explicitly instead of its `.` alias so people understand what the command does.
ed02a97
@koenpunt

👍

@creationix
Owner

I used to recommend people install it in a hidden directory, but it confused them. The reason I use . over source was because I was under the impression that they didn't quite do the same thing.

@olivierlacan

@creationix Since the shell script does it, I find it odd to recommend differently in the manual instructions.

. and source are indeed aliases in Bash not in POSIX sh: http://askubuntu.com/a/25491

@therealplato

I also ran into this issue. I installed nvm with the first snippet in your readme: curl https://raw.github.com/creationix/nvm/master/install.sh | sh. This worked perfectly and installed to ~/.nvm/. Your provided snippet attempts to source ~/nvm: . ~/nvm/nvm.sh, which works for the second installation method but not the first.

I suggest standardizing it to ~/.nvm throughout the whole readme; dotfiles are a very common linux idiom and this is a sensible place to use them.

@weisjohn

👍 to standardizing

@ljharb ljharb closed this in #253 Jun 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment