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

Add support for NVM_SILENT environment variable #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

regulskimichal
Copy link

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.

@raisedadead
Copy link

@lukechilds please consider merging this.

Copy link

@gentslava gentslava left a 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

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

Choose a reason for hiding this comment

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

It is too

@nottmey
Copy link

nottmey commented Dec 7, 2023

@regulskimichal would be great to have this, if you can spare the time fixing the remarks

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.

None yet

4 participants