mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-04-04 03:54:51 +08:00
[Fix] nvm install: fix nvm err typo to nvm_err for -s/-b conflict
The error message for using `-s` and `-b` together was calling
`nvm err` (invoking nvm with subcommand "err") instead of the
`nvm_err` helper function, causing the error message to never be displayed and instead showing the help text with exit code 127.
Bug introduced in 4fdef427e4 / #2439
This commit is contained in:
4
nvm.sh
4
nvm.sh
@@ -3439,7 +3439,7 @@ nvm() {
|
||||
shift # consume "-s"
|
||||
nobinary=1
|
||||
if [ $nosource -eq 1 ]; then
|
||||
nvm err '-s and -b cannot be set together since they would skip install from both binary and source'
|
||||
nvm_err '-s and -b cannot be set together since they would skip install from both binary and source'
|
||||
return 6
|
||||
fi
|
||||
;;
|
||||
@@ -3447,7 +3447,7 @@ nvm() {
|
||||
shift # consume "-b"
|
||||
nosource=1
|
||||
if [ $nobinary -eq 1 ]; then
|
||||
nvm err '-s and -b cannot be set together since they would skip install from both binary and source'
|
||||
nvm_err '-s and -b cannot be set together since they would skip install from both binary and source'
|
||||
return 6
|
||||
fi
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user