[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.
parent
50ae1e5199
commit
9b2629384f
7
nvm.sh
7
nvm.sh
|
@ -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
|
||||||
ADDITIONAL_PARAMETERS="--without-snapshot ${ADDITIONAL_PARAMETERS}"
|
if [ -n "${ADDITIONAL_PARAMETERS}" ]; then
|
||||||
|
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 && \
|
||||||
|
|
Loading…
Reference in New Issue