Use $() instead of backticks; add quotes

master
Jordan Harband 2014-09-23 23:49:10 -07:00
parent 4f081ce4be
commit 51f6109f8d
1 changed files with 2 additions and 2 deletions

4
nvm.sh
View File

@ -161,7 +161,7 @@ nvm_version() {
return $?
fi
VERSION=`nvm_ls $PATTERN | tail -n1`
VERSION="$(nvm_ls "$PATTERN" | tail -n1)"
echo "$VERSION"
if [ "$VERSION" = 'N/A' ]; then
@ -173,7 +173,7 @@ nvm_remote_version() {
local PATTERN
PATTERN=$1
local VERSION
VERSION=`nvm_ls_remote $PATTERN | tail -n1`
VERSION="$(nvm_ls_remote "$PATTERN" | tail -n1)"
echo "$VERSION"
if [ "$VERSION" = 'N/A' ]; then