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 the ability to exclude specific cases from NVM_AUTO_USE #62

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

henderea
Copy link

A git repo I have checked out locally recently added a .nvmrc with version 13.8.0. I don't have that version installed, so every time I enter that directory, it starts trying to install 13.8.0, which I have to quickly cancel every time since there's no reason to install 13.8.0 when it is outdated but not LTS.

This PR adds support for the array environment variables NVM_AUTO_USE_IGNORE_VERSION and NVM_AUTO_USE_IGNORE_PATH. These are used to ignore specific values from .nvmrc and to ignore the .nvmrc in specific directories.

Examples (in ~/.zshrc):

export NVM_AUTO_USE_IGNORE_VERSION=("v13.8.0" "lts/boron")

Auto-use will be skipped if the .nvmrc file it finds contains the values v13.8.0 or lts/boron.

export NVM_AUTO_USE_IGNORE_PATH=("$HOME/projects/annoying-external-repo")

Auto-use will be skipped if the .nvmrc file it finds is $HOME/projects/annoying-external-repo/.nvmrc.

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.

3 participants