Thanks for the great free software.
My project uses multiple different repositories, and each has their own individual directory locally. When I change to one directory, avn sets up the version of node per the .node-version file in the target directory. This is desirable.
However, when I change to another directory which contains another .node-version file having exactly the same contents, avn once again goes through the setup process.
I suggest that when changing directories and switching node versions, avn should, before proceeding with anything else, compare the current and target versions of Node, and if they are the same, then abort the setup process rather than forcing the user to wait a few seconds.
Here is some sample output:
hyperion:project chad$ cd api
avn activated 8.6.0 (avn-nvm v8.6.0)
hyperion:api chad$ cd ../app
avn activated 8.6.0 (avn-nvm v8.6.0)
hyperion:app chad$ cd ../admin
avn activated 8.6.0 (avn-nvm v8.6.0)
hyperion:admin chad$
As you can see, Node 8.6.0 was unnecessarily activated multiple times.
Details
- avn
0.2.3
- node
8.6.0
- nvm
0.33.8
- zsh
zsh 5.3 (x86_64-apple-darwin17.0)
- bash
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)
The output of __avn_debug in the directory with a .node-version file is:
avn activated 8.6.0 (avn-nvm v8.6.0)
nvm use v8.6.0 > /dev/null;
avn is loaded in my ~/.{bash|zsh}{_profile|rc} file with:
[[ -s "$HOME/.avn/bin/avn.sh" ]] && source "$HOME/.avn/bin/avn.sh" # load avn
nvm specific