Ensuring paths are in quotes, to preserve spaces.

master
Jordan Harband 2014-05-04 00:39:46 -07:00
parent c77be55cdc
commit 4a7275a0c6
1 changed files with 3 additions and 3 deletions

6
nvm.sh
View File

@ -46,7 +46,7 @@ nvm_find_up() {
nvm_find_nvmrc() { nvm_find_nvmrc() {
local dir=$(nvm_find_up '.nvmrc') local dir="$(nvm_find_up '.nvmrc')"
if [ -e "$dir/.nvmrc" ]; then if [ -e "$dir/.nvmrc" ]; then
echo "$dir/.nvmrc" echo "$dir/.nvmrc"
fi fi
@ -54,10 +54,10 @@ nvm_find_nvmrc() {
# Obtain nvm version from rc file # Obtain nvm version from rc file
nvm_rc_version() { nvm_rc_version() {
local NVMRC_PATH=$(nvm_find_nvmrc) local NVMRC_PATH="$(nvm_find_nvmrc)"
if [ -e "$NVMRC_PATH" ]; then if [ -e "$NVMRC_PATH" ]; then
NVM_RC_VERSION=`cat "$NVMRC_PATH" | head -n 1` NVM_RC_VERSION=`cat "$NVMRC_PATH" | head -n 1`
echo "Found $NVMRC_PATH with version <$NVM_RC_VERSION>" echo "Found '$NVMRC_PATH' with version <$NVM_RC_VERSION>"
fi fi
} }