mirror of
https://github.com/GRFreire/dotfiles.git
synced 2026-01-10 20:39:39 +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() {
|
cd() {
|
||||||
if builtin cd "$@" 2>/dev/null; then
|
if builtin cd "$@" 2>/dev/null; then
|
||||||
FOUND="$(locate_nvmrc)"
|
FOUND="$(locate_nvmrc)"
|
||||||
if [ "$DEFAULT" != "$FOUND" ]; then
|
if [ "$FOUND" != "" ] && [ "$DEFAULT" != "$FOUND" ]; then
|
||||||
DEFAULT=$FOUND
|
DEFAULT=$FOUND
|
||||||
nvm use
|
nvm use
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user