fix regression: CLI options with hyphens like -b ascii-only (#1640)

fixes #1637
This commit is contained in:
kzc
2017-03-23 23:55:03 -04:00
committed by Alex Lam S.L
parent e918748d88
commit 79334dda10
2 changed files with 3 additions and 1 deletions

View File

@@ -561,7 +561,7 @@ function getOptions(flag, constants) {
var ast;
try {
ast = UglifyJS.parse(x, { expression: true });
ast = UglifyJS.parse(x, { cli: true, expression: true });
} catch(ex) {
if (ex instanceof UglifyJS.JS_Parse_Error) {
print_error("Error parsing arguments for flag `" + flag + "': " + x);