More shellcheck recommendations
parent
51f6109f8d
commit
ce69c8413e
6
nvm.sh
6
nvm.sh
|
@ -171,12 +171,12 @@ nvm_version() {
|
||||||
|
|
||||||
nvm_remote_version() {
|
nvm_remote_version() {
|
||||||
local PATTERN
|
local PATTERN
|
||||||
PATTERN=$1
|
PATTERN="$1"
|
||||||
local VERSION
|
local VERSION
|
||||||
VERSION="$(nvm_ls_remote "$PATTERN" | tail -n1)"
|
VERSION="$(nvm_ls_remote "$PATTERN" | tail -n1)"
|
||||||
echo "$VERSION"
|
echo "$VERSION"
|
||||||
|
|
||||||
if [ "$VERSION" = 'N/A' ]; then
|
if [ "~$VERSION" = '~N/A' ]; then
|
||||||
return 3
|
return 3
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -251,7 +251,7 @@ nvm_ls() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$NVM_DIR/alias/$PATTERN" ]; then
|
if [ -f "$NVM_DIR/alias/$PATTERN" ]; then
|
||||||
nvm_version `cat $NVM_DIR/alias/$PATTERN`
|
nvm_version "$(cat "$NVM_DIR/alias/$PATTERN")"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
# If it looks like an explicit version, don't do anything funny
|
# If it looks like an explicit version, don't do anything funny
|
||||||
|
|
Loading…
Reference in New Issue