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));