mirror of
https://github.com/lukechilds/zsh-nvm.git
synced 2025-01-30 09:47:14 +08:00
fix the case when there is no node at all
This commit is contained in:
parent
412912461d
commit
a430aab4f9
@ -173,7 +173,7 @@ _current_node_version() {
|
||||
|
||||
_node_is_nvm() {
|
||||
local node_path="$(command which node 2>/dev/null)"
|
||||
if [[ -z "${node_path##$NVM_DIR*}" ]]; then
|
||||
if [[ -n "$node_path" && -z "${node_path##$NVM_DIR*}" ]]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user