Ensure `nvm use` output shows up *after* `prefix` check passes.
parent
6b3c34313c
commit
41153e207d
8
nvm.sh
8
nvm.sh
|
@ -1789,13 +1789,14 @@ nvm() {
|
||||||
if [ "$NVM_SYMLINK_CURRENT" = true ]; then
|
if [ "$NVM_SYMLINK_CURRENT" = true ]; then
|
||||||
command rm -f "$NVM_DIR/current" && ln -s "$NVM_VERSION_DIR" "$NVM_DIR/current"
|
command rm -f "$NVM_DIR/current" && ln -s "$NVM_VERSION_DIR" "$NVM_DIR/current"
|
||||||
fi
|
fi
|
||||||
|
local NVM_USE_OUTPUT
|
||||||
if nvm_is_iojs_version "$VERSION"; then
|
if nvm_is_iojs_version "$VERSION"; then
|
||||||
if [ $NVM_USE_SILENT -ne 1 ]; then
|
if [ $NVM_USE_SILENT -ne 1 ]; then
|
||||||
echo "Now using io.js $(nvm_strip_iojs_prefix "$VERSION")$(nvm_print_npm_version)"
|
NVM_USE_OUTPUT="Now using io.js $(nvm_strip_iojs_prefix "$VERSION")$(nvm_print_npm_version)"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ $NVM_USE_SILENT -ne 1 ]; then
|
if [ $NVM_USE_SILENT -ne 1 ]; then
|
||||||
echo "Now using node $VERSION$(nvm_print_npm_version)"
|
NVM_USE_OUTPUT="Now using node $VERSION$(nvm_print_npm_version)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "_$VERSION" != "_system" ]; then
|
if [ "_$VERSION" != "_system" ]; then
|
||||||
|
@ -1811,6 +1812,9 @@ nvm() {
|
||||||
return 11
|
return 11
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [ -n "$NVM_USE_OUTPUT" ]; then
|
||||||
|
echo "$NVM_USE_OUTPUT"
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
"run" )
|
"run" )
|
||||||
local provided_version
|
local provided_version
|
||||||
|
|
Loading…
Reference in New Issue