Skip to content
Myr

Making `help` error output actually output to stderr consistently.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jordan Harband · committed by Jordan Harband · parent 5802ac3 · Browse files · 1 file+16 added−14 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+16 added−14 removed

  • other:+16 added−14 removed

1 file+16 added−14 removed

modified:nvm.sh+16 added-14 removed
1110 unmodified lines
1111 if [ $# -lt 2 ]; then1112 version_not_provided=11113 nvm_rc_version1114 if [ -z "$NVM_RC_VERSION" ]; then1115 nvm help1116 return1115 >&2 nvm help1116 return 1271117 fi1118 fi11191120 shift
96 unmodified lines
1217 nvm_install_node_source "$VERSION" "$REINSTALL_PACKAGES_FROM" "$ADDITIONAL_PARAMETERS"1218 fi1219 ;;1220 "uninstall" )1221 [ $# -ne 2 ] && nvm help && return1221 if [ $# -ne 2 ]; then1222 >&2 nvm help1223 return 1271224 fi12251226 local PATTERN1227 PATTERN="$2"1228 case "_$PATTERN" in
71 unmodified lines
1300 echo "$NVM_DIR/*/lib/node_modules removed from \$NODE_PATH"1301 fi1302 ;;1303 "use" )1301 if [ $# -eq 0 ]; then1302 nvm help1303 return 1271304 fi13051304 local PROVIDED_VERSION1305 if [ $# -eq 1 ]; then1306 nvm_rc_version1307 if [ -n "$NVM_RC_VERSION" ]; then
19 unmodified lines
1327 esac1328 fi13291330 if [ -z "$VERSION" ]; then1333 nvm help1331 >&2 nvm help1332 return 1271333 fi13341335 if [ "_$VERSION" = '_system' ]; then
61 unmodified lines
1397 else1398 VERSION='N/A'1399 fi1400 if [ $VERSION = "N/A" ]; then1403 nvm help1401 >&2 nvm help1402 return 1271403 fi1404 fi1405
140 unmodified lines
1546 else1547 VERSION="$2"1548 fi1549 if [ -z "$VERSION" ]; then1552 nvm help1550 >&2 nvm help1551 return 1271552 fi15531554 if [ "_$VERSION" = '_system' ]; then
75 unmodified lines
1630 "unalias" )1631 local NVM_ALIAS_DIR1632 NVM_ALIAS_DIR="$(nvm_alias_path)"1633 command mkdir -p "$NVM_ALIAS_DIR"1636 [ $# -ne 2 ] && nvm help && return 1271634 if [ $# -ne 2 ]; then1635 >&2 nvm help1636 return 1271637 fi1638 [ ! -f "$NVM_ALIAS_DIR/$2" ] && echo "Alias $2 doesn't exist!" >&2 && return1639 command rm -f "$NVM_ALIAS_DIR/$2"1640 echo "Deleted alias $2"1641 ;;1642 "reinstall-packages" | "copy-packages" )1643 if [ $# -ne 2 ]; then1643 nvm help1644 >&2 nvm help1645 return 1271646 fi16471648 local PROVIDED_VERSION
41 unmodified lines
1690 nvm_supports_source_options > /dev/null 2>&11691 unset RC_VERSION NVM_NODEJS_ORG_MIRROR NVM_DIR NVM_CD_FLAGS > /dev/null 2>&11692 ;;1693 * )1693 nvm help1694 >&2 nvm help1695 return 1271696 ;;1697 esac1698}1699
17 unmodified lines