Don't check `$1` unless `$#` is >= 1.

Fixes #873. Partially fixes #868.
Jordan Harband 2015-10-14 22:06:47 -07:00
parent 016e7dfdab
commit 0b9526e3b4
1 changed files with 1 additions and 1 deletions

2
nvm.sh
View File

@ -2239,7 +2239,7 @@ $NVM_LS_REMOTE_POST_MERGED_OUTPUT" | command grep -v "N/A" | command sed '/^$/d'
}
nvm_supports_source_options() {
[ "_$(echo 'echo $1' | . /dev/stdin yes 2> /dev/null)" = "_yes" ]
[ "_$(echo '[ $# -gt 0 ] && echo $1' | . /dev/stdin yes 2> /dev/null)" = "_yes" ]
}
nvm_supports_xz() {