Use 'read' built-in instead of $(cat ... | head -n1)
parent
78ff9a2215
commit
f1b8cf8fd6
2
nvm.sh
2
nvm.sh
|
@ -74,7 +74,7 @@ nvm_rc_version() {
|
||||||
local NVMRC_PATH
|
local NVMRC_PATH
|
||||||
NVMRC_PATH="$(nvm_find_nvmrc)"
|
NVMRC_PATH="$(nvm_find_nvmrc)"
|
||||||
if [ -e "$NVMRC_PATH" ]; then
|
if [ -e "$NVMRC_PATH" ]; then
|
||||||
NVM_RC_VERSION=`cat "$NVMRC_PATH" | head -n 1`
|
read NVM_RC_VERSION < "$NVMRC_PATH"
|
||||||
echo "Found '$NVMRC_PATH' with version <$NVM_RC_VERSION>"
|
echo "Found '$NVMRC_PATH' with version <$NVM_RC_VERSION>"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue