Use 'read' built-in instead of $(cat ... | head -n1)

This commit is contained in:
Olivier Mengué authored and Jordan Harband committed 2014-07-10 12:15:27 -07:00
1 parent 78ff9a2215
commit f1b8cf8fd6
1 file changed
+1 -1
+1 -1
View File
@@ -74,7 +74,7 @@ nvm_rc_version() {
local NVMRC_PATH
NVMRC_PATH="$(nvm_find_nvmrc)"
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>"
fi
}