From 3230952d57023cddefc62fde4c525b29f93680e0 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Mon, 8 Jun 2020 04:16:03 +0100 Subject: [PATCH] improve handling of invalid CLI options (#3966) --- bin/uglifyjs | 1 + 1 file changed, 1 insertion(+) 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); }); } -- 2.34.1