-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Add support for NVM_SILENT environment variable #91
base: master
Are you sure you want to change the base?
Conversation
@lukechilds please consider merging this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your code always works in silent mode because of mistake.
@@ -174,11 +174,19 @@ _zsh_nvm_auto_use() { | |||
if [[ "$nvmrc_node_version" = "N/A" ]]; then | |||
nvm install && export NVM_AUTO_USE_ACTIVE=true | |||
elif [[ "$nvmrc_node_version" != "$node_version" ]]; then | |||
nvm use && export NVM_AUTO_USE_ACTIVE=true | |||
if [[ "$NVM_SILENT" = true ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an assignment instead of a condition.
fi | ||
elif [[ "$node_version" != "$(nvm version default)" ]] && [[ "$NVM_AUTO_USE_ACTIVE" = true ]]; then | ||
echo "Reverting to nvm default version" | ||
nvm use default | ||
if [[ "$NVM_SILENT" = true ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is too
@regulskimichal would be great to have this, if you can spare the time fixing the remarks |
I'd like to add a feature that disables some messages while switching between multiple versions of node. I use powerlevel10k theme that already prints versions of node so I find it useful to make it possible to disable some verbose messages.