Fix for parse error - Issue #134

Conditional operator [[ ]] tests files and strings. To test error codes
returned from command, use if statement directly without any operators.
This commit is contained in:
Lyncredible
2016-04-27 11:04:34 -07:00
parent a127f8de71
commit e3924f173c

View File

@@ -540,7 +540,7 @@ prompt_nvm() {
fi fi
local nvm_prompt local nvm_prompt
if [[ $(type nvm >/dev/null 2>&1) ]]; then if type nvm >/dev/null 2>&1; then
nvm_prompt=$(nvm current 2>/dev/null) nvm_prompt=$(nvm current 2>/dev/null)
[[ "${nvm_prompt}x" == "x" ]] && return [[ "${nvm_prompt}x" == "x" ]] && return
else else