|
|
|
@ -65,7 +65,7 @@ if zstyle -t ':omz:plugins:nvm' autoload; then |
|
|
|
local node_version="$(nvm version)" |
|
|
|
local node_version="$(nvm version)" |
|
|
|
local nvmrc_path="$(nvm_find_nvmrc)" |
|
|
|
local nvmrc_path="$(nvm_find_nvmrc)" |
|
|
|
local nvm_silent="" |
|
|
|
local nvm_silent="" |
|
|
|
zstyle -t ':omz:plugins:nvm' silent-autoload && _nvm_silent="--silent" |
|
|
|
zstyle -t ':omz:plugins:nvm' silent-autoload && nvm_silent="--silent" |
|
|
|
|
|
|
|
|
|
|
|
if [[ -n "$nvmrc_path" ]]; then |
|
|
|
if [[ -n "$nvmrc_path" ]]; then |
|
|
|
local nvmrc_node_version=$(nvm version $(cat "$nvmrc_path" | tr -dc '[:print:]')) |
|
|
|
local nvmrc_node_version=$(nvm version $(cat "$nvmrc_path" | tr -dc '[:print:]')) |
|
|
|
@ -76,7 +76,10 @@ if zstyle -t ':omz:plugins:nvm' autoload; then |
|
|
|
nvm use $nvm_silent |
|
|
|
nvm use $nvm_silent |
|
|
|
fi |
|
|
|
fi |
|
|
|
elif [[ "$node_version" != "$(nvm version default)" ]]; then |
|
|
|
elif [[ "$node_version" != "$(nvm version default)" ]]; then |
|
|
|
|
|
|
|
if [[ -z $nvm_silent ]]; then |
|
|
|
echo "Reverting to nvm default version" |
|
|
|
echo "Reverting to nvm default version" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
nvm use default $nvm_silent |
|
|
|
nvm use default $nvm_silent |
|
|
|
fi |
|
|
|
fi |
|
|
|
} |
|
|
|
} |
|
|
|
|