[Fix] set IFS to default for all nvm commands.

Fixes #1227. Fixes #1244. Fixes #1514. Fixes #1518.
Jordan Harband 2017-04-28 00:41:55 -07:00
parent accd6ae298
commit dc5dfe3bc1
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
2 changed files with 26 additions and 0 deletions

8
nvm.sh
View File

@ -2163,6 +2163,14 @@ nvm() {
return
fi
local DEFAULT_IFS
DEFAULT_IFS=" $(echo t | tr t \\t)
"
if [ "${IFS}" != "${DEFAULT_IFS}" ]; then
IFS="${DEFAULT_IFS}" nvm "$@"
return $?
fi
local COMMAND
COMMAND="${1-}"
shift

View File

@ -0,0 +1,18 @@
#!/bin/sh
\. ../../../nvm.sh
mkdir "${NVM_DIR}/v0.0.1"
mkdir "${NVM_DIR}/v0.0.3"
mkdir "${NVM_DIR}/v0.0.9"
mkdir "${NVM_DIR}/v0.3.1"
mkdir "${NVM_DIR}/v0.3.3"
mkdir "${NVM_DIR}/v0.3.9"
mkdir -p "${NVM_DIR}/versions/node/v0.12.87"
mkdir -p "${NVM_DIR}/versions/node/v0.12.9"
mkdir -p "${NVM_DIR}/versions/io.js/v0.1.2"
mkdir -p "${NVM_DIR}/versions/io.js/v0.10.2"
set -e
IFS='' nvm ls