Skip to content

Add support for NVM_SILENT environment variable#91

Open
regulskimichal wants to merge 1 commit into
lukechilds:masterfrom
regulskimichal:nvm_silent
Open

Add support for NVM_SILENT environment variable#91
regulskimichal wants to merge 1 commit into
lukechilds:masterfrom
regulskimichal:nvm_silent

Conversation

@regulskimichal

Copy link
Copy Markdown

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
Copy Markdown

@lukechilds please consider merging this.

@gentslava gentslava left a comment

Copy link
Copy Markdown

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.

Comment thread zsh-nvm.plugin.zsh
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

Copy link
Copy Markdown

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.

Comment thread zsh-nvm.plugin.zsh
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It is too

@nottmey

nottmey commented Dec 7, 2023

Copy link
Copy Markdown

@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.

4 participants