From de3599c017a7961b5ad343d8d04684055858f084 Mon Sep 17 00:00:00 2001 From: James George Date: Sun, 13 Jan 2019 13:49:06 +0530 Subject: [PATCH] Minor fix :construction: --- bin/uglifyjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/uglifyjs b/bin/uglifyjs index 61678198..fcb41bf8 100755 --- a/bin/uglifyjs +++ b/bin/uglifyjs @@ -54,6 +54,9 @@ program.option("--verbose", "Print diagnostic messages."); program.option("--warn", "Print warning messages."); program.option("--wrap ", "Embed everything as a function with “exports” corresponding to “name” globally."); program.arguments("[files...]").parseArgv(process.argv); +if (!program.args.length){ + program.outputHelp(); +} if (program.configFile) { options = JSON.parse(read_file(program.configFile)); } @@ -169,9 +172,6 @@ if (program.self) { }); process.stdin.resume(); } -if (!program.args.length){ - program.help(); -} function convert_ast(fn) { return UglifyJS.AST_Node.from_mozilla_ast(Object.keys(files).reduce(fn, null));