diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-06-08 04:16:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-08 11:16:03 +0800 |
commit | 3230952d57023cddefc62fde4c525b29f93680e0 (patch) | |
tree | 00c44a28988a8febed54331ac1f58829242d070c | |
parent | df3bb8028a7cd8a69a3c76090d12f808ca7abc3b (diff) | |
download | tracifyjs-3230952d57023cddefc62fde4c525b29f93680e0.tar.gz tracifyjs-3230952d57023cddefc62fde4c525b29f93680e0.zip |
improve handling of invalid CLI options (#3966)
-rwxr-xr-x | bin/uglifyjs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bin/uglifyjs b/bin/uglifyjs index c15acca6..fcbdff66 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -40,6 +40,7 @@ while (args.length) { } else if (arg[1] == "-") { process_option(arg.slice(2)); } else [].forEach.call(arg.slice(1), function(letter, index, arg) { + if (!(letter in short_forms)) fatal("invalid option -" + letter); process_option(short_forms[letter], index + 1 < arg.length); }); } |