Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save PavanGangireddy/89e6abbe5d02432f9eebab3097481d89 to your computer and use it in GitHub Desktop.
Save PavanGangireddy/89e6abbe5d02432f9eebab3097481d89 to your computer and use it in GitHub Desktop.
Automatically use .yvmrc or .nvmrc upon entering a project directory
# Problem:
- When working with multiple projects that utilize different versions of yarn, npm,
I always have to type `yvm use` in order to have `yvm set` the correct version of yarn that my project has.
# Solution:
- When I switch into a directory that already has a .nvmrc file, nvm automatically should run `nvm use`
so that I don't have to do it manually.
# Add the below script to your .zshrc
- https://github.com/nvm-sh/nvm#calling-nvm-use-automatically-in-a-directory-with-a-nvmrc-file
- When I switch into a directory that already has a .yvmrc file, yvm automatically runs `yvm use` so that
I don't have to do it manually.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment