mirror of
https://github.com/GRFreire/dotfiles.git
synced 2026-01-09 20:19:37 +00:00
fast-nvm: fix nvm use with no .nvmrc
script was trying to run ``nvm use`` when there was no .nvmrc (eg: /usr/share)
This commit is contained in:
parent
9f9057cd20
commit
09a2f62c5d
@ -11,7 +11,7 @@ DEFAULT=$(locate_nvmrc)
|
||||
cd() {
|
||||
if builtin cd "$@" 2>/dev/null; then
|
||||
FOUND="$(locate_nvmrc)"
|
||||
if [ "$DEFAULT" != "$FOUND" ]; then
|
||||
if [ "$FOUND" != "" ] && [ "$DEFAULT" != "$FOUND" ]; then
|
||||
DEFAULT=$FOUND
|
||||
nvm use
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user