Skip to content

Commit

Permalink
[Fix] nvm install -s: ensure additional params lack a trailing space.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ljharb committed Mar 18, 2017
1 parent 50ae1e5 commit 9b26293
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,11 @@ nvm_install_source() {
local NVM_ARCH
NVM_ARCH="$(nvm_get_arch)"
if [ "${NVM_ARCH}" = 'armv6l' ] || [ "${NVM_ARCH}" = 'armv7l' ]; then
ADDITIONAL_PARAMETERS="--without-snapshot ${ADDITIONAL_PARAMETERS}"
if [ -n "${ADDITIONAL_PARAMETERS}" ]; then
ADDITIONAL_PARAMETERS="--without-snapshot ${ADDITIONAL_PARAMETERS}"
else
ADDITIONAL_PARAMETERS='--without-snapshot'
fi
fi

if [ -n "${ADDITIONAL_PARAMETERS}" ]; then
Expand Down Expand Up @@ -1883,6 +1887,7 @@ nvm_install_source() {
command "${tar}" -x${tar_compression_flag}f "${TARBALL}" -C "${TMPDIR}" --strip-components 1 && \
VERSION_PATH="$(nvm_version_path "${PREFIXED_VERSION}")" && \
nvm_cd "${TMPDIR}" && \
nvm_echo '$>'./configure --prefix="${VERSION_PATH}" $ADDITIONAL_PARAMETERS'<' && \
./configure --prefix="${VERSION_PATH}" $ADDITIONAL_PARAMETERS && \
$make -j "${NVM_MAKE_JOBS}" ${MAKE_CXX-} && \
command rm -f "${VERSION_PATH}" 2>/dev/null && \
Expand Down

0 comments on commit 9b26293

Please sign in to comment.