[Fix] `nvm install -s`: ensure additional params lack a trailing space.

Note: I believe this does not fix the underlying issue in zsh, which is
that it does not split up `$ADDITIONAL_PARAMETERS` and instead passes
the contents as one single argument.
Jordan Harband 2017-03-17 23:20:17 -07:00
parent 50ae1e5199
commit 9b2629384f
No known key found for this signature in database
GPG Key ID: 64A196AEE0916D55
1 changed files with 6 additions and 1 deletions

5
nvm.sh
View File

@ -1826,7 +1826,11 @@ nvm_install_source() {
local NVM_ARCH local NVM_ARCH
NVM_ARCH="$(nvm_get_arch)" NVM_ARCH="$(nvm_get_arch)"
if [ "${NVM_ARCH}" = 'armv6l' ] || [ "${NVM_ARCH}" = 'armv7l' ]; then if [ "${NVM_ARCH}" = 'armv6l' ] || [ "${NVM_ARCH}" = 'armv7l' ]; then
if [ -n "${ADDITIONAL_PARAMETERS}" ]; then
ADDITIONAL_PARAMETERS="--without-snapshot ${ADDITIONAL_PARAMETERS}" ADDITIONAL_PARAMETERS="--without-snapshot ${ADDITIONAL_PARAMETERS}"
else
ADDITIONAL_PARAMETERS='--without-snapshot'
fi
fi fi
if [ -n "${ADDITIONAL_PARAMETERS}" ]; then if [ -n "${ADDITIONAL_PARAMETERS}" ]; then
@ -1883,6 +1887,7 @@ nvm_install_source() {
command "${tar}" -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" --strip-components 1 && \ command "${tar}" -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" --strip-components 1 && \
VERSION_PATH="$(nvm_version_path "${PREFIXED_VERSION}")" && \ VERSION_PATH="$(nvm_version_path "${PREFIXED_VERSION}")" && \
nvm_cd "${TMPDIR}" && \ nvm_cd "${TMPDIR}" && \
nvm_echo '$>'./configure --prefix="${VERSION_PATH}" $ADDITIONAL_PARAMETERS'<' && \
./configure --prefix="${VERSION_PATH}" $ADDITIONAL_PARAMETERS && \ ./configure --prefix="${VERSION_PATH}" $ADDITIONAL_PARAMETERS && \
$make -j "${NVM_MAKE_JOBS}" ${MAKE_CXX-} && \ $make -j "${NVM_MAKE_JOBS}" ${MAKE_CXX-} && \
command rm -f "${VERSION_PATH}" 2>/dev/null && \ command rm -f "${VERSION_PATH}" 2>/dev/null && \