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

Ability to set NVM_DIR and nvm_preffix separately in configuration #24

Merged
merged 3 commits into from
Feb 19, 2018
Merged

Ability to set NVM_DIR and nvm_preffix separately in configuration #24

merged 3 commits into from
Feb 19, 2018

Conversation

kvervo
Copy link
Contributor

@kvervo kvervo commented Feb 18, 2018

Ability to set NVM_DIR and nvm_preffix separately in configuration

This is needed if you have installed NVM using a custom path but still using ~/.nvm as NVM_DIR. For example this is the case when using brew to install NVM on MacOS.

Brew would install NVM into /usr/local/Cellar/nvm/%nvm_version%/nvm.sh and ask to set $NVM_DIR to ~/.nvm. Hence user is required to set nvm_prefix separately from NVM_DIR.

This is needed if you have installed NVM using Brew.
Brew would install NVM into /usr/local/Cellar/nvm/%nvm_version%/nvm.sh and
ask to set $NVM_DIR to ~/.nvm. Hence user is required to set nvm_prefix separately
from NVM_DIR.
@FabioAntunes
Copy link
Owner

Thanks for the PR, everything seems OK. But I would just like to test it before merging. Will be doing that later today.

@@ -4,7 +4,7 @@ function nvm
return
end
set -q NVM_DIR; or set -gx NVM_DIR ~/.nvm
set -g nvm_prefix $NVM_DIR
set -q nvm_prefix; or set -g nvm_prefix $NVM_DIR
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you just add the -gx so it gets exported to the child processes?

set -q nvm_prefix; or set -gx nvm_prefix $NVM_DIR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my bad.

Added -gx parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my bad.

Added -gx paramaters

@FabioAntunes FabioAntunes merged commit fbd24e7 into FabioAntunes:master Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants