Fix which command in zsh (#604).

master
niris 2015-01-02 09:47:26 +08:00
parent 8328741792
commit 3f5ce8b93a
1 changed files with 2 additions and 2 deletions

4
nvm.sh
View File

@ -272,7 +272,7 @@ nvm_alias() {
nvm_ls_current() {
local NVM_LS_CURRENT_NODE_PATH
NVM_LS_CURRENT_NODE_PATH="$(which node 2> /dev/null)"
NVM_LS_CURRENT_NODE_PATH="$(command which node 2> /dev/null)"
if [ $? -ne 0 ]; then
echo 'none'
elif nvm_tree_contains_path "$NVM_DIR" "$NVM_LS_CURRENT_NODE_PATH"; then
@ -984,7 +984,7 @@ nvm() {
if [ "_$VERSION" = '_system' ]; then
if nvm_has_system_node >/dev/null 2>&1; then
local NVM_BIN
NVM_BIN="$(nvm use system >/dev/null 2>&1 && which node)"
NVM_BIN="$(nvm use system >/dev/null 2>&1 && command which node)"
if [ -n "$NVM_BIN" ]; then
echo "$NVM_BIN"
return