aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2020-06-08 04:16:03 +0100
committerGitHub <noreply@github.com>2020-06-08 11:16:03 +0800
commit3230952d57023cddefc62fde4c525b29f93680e0 (patch)
tree00c44a28988a8febed54331ac1f58829242d070c /bin
parentdf3bb8028a7cd8a69a3c76090d12f808ca7abc3b (diff)
downloadtracifyjs-3230952d57023cddefc62fde4c525b29f93680e0.tar.gz
tracifyjs-3230952d57023cddefc62fde4c525b29f93680e0.zip
improve handling of invalid CLI options (#3966)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/uglifyjs1
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);
});
}