[nvm run / nvm exec]: Silence "find nvmrc" output when `--silent` is provided.
Per https://github.com/creationix/nvm/issues/846#issuecomment-147588453
parent
2a0316f80d
commit
016e7dfdab
18
nvm.sh
18
nvm.sh
|
@ -1857,7 +1857,11 @@ nvm() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $# -lt 1 ]; then
|
if [ $# -lt 1 ]; then
|
||||||
nvm_rc_version && has_checked_nvmrc=1
|
if [ "$NVM_SILENT" -eq 1 ]; then
|
||||||
|
nvm_rc_version >/dev/null 2>&1 && has_checked_nvmrc=1
|
||||||
|
else
|
||||||
|
nvm_rc_version && has_checked_nvmrc=1
|
||||||
|
fi
|
||||||
if [ -n "$NVM_RC_VERSION" ]; then
|
if [ -n "$NVM_RC_VERSION" ]; then
|
||||||
VERSION="$(nvm_version "$NVM_RC_VERSION")"
|
VERSION="$(nvm_version "$NVM_RC_VERSION")"
|
||||||
else
|
else
|
||||||
|
@ -1875,7 +1879,11 @@ nvm() {
|
||||||
if [ "_$VERSION" = "_N/A" ] && ! nvm_is_valid_version "$provided_version"; then
|
if [ "_$VERSION" = "_N/A" ] && ! nvm_is_valid_version "$provided_version"; then
|
||||||
provided_version=''
|
provided_version=''
|
||||||
if [ $has_checked_nvmrc -ne 1 ]; then
|
if [ $has_checked_nvmrc -ne 1 ]; then
|
||||||
nvm_rc_version && has_checked_nvmrc=1
|
if [ "$NVM_SILENT" -eq 1 ]; then
|
||||||
|
nvm_rc_version >/dev/null 2>&1 && has_checked_nvmrc=1
|
||||||
|
else
|
||||||
|
nvm_rc_version && has_checked_nvmrc=1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
VERSION="$(nvm_version "$NVM_RC_VERSION")"
|
VERSION="$(nvm_version "$NVM_RC_VERSION")"
|
||||||
else
|
else
|
||||||
|
@ -1941,7 +1949,11 @@ nvm() {
|
||||||
if [ -n "$provided_version" ]; then
|
if [ -n "$provided_version" ]; then
|
||||||
VERSION="$(nvm_version "$provided_version")"
|
VERSION="$(nvm_version "$provided_version")"
|
||||||
if [ "_$VERSION" = "_N/A" ] && ! nvm_is_valid_version "$provided_version"; then
|
if [ "_$VERSION" = "_N/A" ] && ! nvm_is_valid_version "$provided_version"; then
|
||||||
nvm_rc_version
|
if [ "$NVM_SILENT" -eq 1 ]; then
|
||||||
|
nvm_rc_version >/dev/null 2>&1
|
||||||
|
else
|
||||||
|
nvm_rc_version
|
||||||
|
fi
|
||||||
provided_version="$NVM_RC_VERSION"
|
provided_version="$NVM_RC_VERSION"
|
||||||
VERSION="$(nvm_version "$provided_version")"
|
VERSION="$(nvm_version "$provided_version")"
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue