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

Install script should also update ~/.bash_profile #904

Open
chriskwan opened this issue Nov 13, 2015 · 1 comment
Open

Install script should also update ~/.bash_profile #904

chriskwan opened this issue Nov 13, 2015 · 1 comment
Labels
installing nvm: profile detection Issues with nvm's own install script, related to figuring out the right profile file. pull request wanted This is a great way to contribute! Help us out :-D

Comments

@chriskwan
Copy link

I was installing nvm on Mac OSX 10.11.1 and ran the install script in the README, which added the following line to my ~/.bashrc:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm

But when restarting my shell, I got: -bash: nvm: command not found

I resolved this by adding the line above to my ~/.bash_profile instead. Maybe the install script should also do this in case other people have this issue (more info about ~/.bashrc vs ~/.bashprofile: http://stackoverflow.com/a/415444)

(Note: you could also add [[ -r ~/.bashrc ]] && . ~/.bashrc to ~/.bash_profile to make it load the ~/.bashrc file.)

@ljharb ljharb added installing nvm: profile detection Issues with nvm's own install script, related to figuring out the right profile file. pull request wanted This is a great way to contribute! Help us out :-D labels Nov 13, 2015
@ljharb
Copy link
Member

ljharb commented Nov 13, 2015

Detecting which profile file is the right one to install into turns out to be incredibly difficult. Any (tested) PRs to improve this are always welcome.

@ljharb ljharb mentioned this issue Nov 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installing nvm: profile detection Issues with nvm's own install script, related to figuring out the right profile file. pull request wanted This is a great way to contribute! Help us out :-D
Projects
None yet
Development

No branches or pull requests

2 participants