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

reference $HOME in $PROFILE addition rather than hard-coding $NVM_DIR #395

Open
michaelficarra opened this issue Apr 10, 2014 · 1 comment
Labels
feature requests I want a new feature in nvm! installing nvm: profile detection Issues with nvm's own install script, related to figuring out the right profile file.

Comments

@michaelficarra
Copy link

I recently had to make this change when $HOME changed.

-[ -s "/Users/michael/.nvm/nvm.sh" ] && . "/Users/michael/.nvm/nvm.sh" # This loads nvm
+[ -s "$HOME/.nvm/nvm.sh" ] && . "$HOME/.nvm/nvm.sh" # This loads nvm

Trying to reinstall nvm failed to fix the path differences because it simply looks for nvm.sh in $PROFILE.

@koenpunt
Copy link
Contributor

If we do this, installing in other directories than $HOME will cause issues. Of course this is an exception we can handle in the install script, but it's like this on purpose.
Also checking if the complete path in the .profile is matching is something I thought of just recently.

@ljharb ljharb added the installing nvm: profile detection Issues with nvm's own install script, related to figuring out the right profile file. label Apr 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature requests I want a new feature in nvm! installing nvm: profile detection Issues with nvm's own install script, related to figuring out the right profile file.
Projects
None yet
Development

No branches or pull requests

3 participants