diff --git a/po/po2json b/po/po2json index d521f30..690d7d0 100755 --- a/po/po2json +++ b/po/po2json @@ -6,7 +6,7 @@ function fatal(message, code) { } function usage() { - console.log("usage: po2json [--module=template.js] input output"); + console.log("usage: po2json [--module=template.js] [--output=output.js] input"); process.exit(2); } @@ -29,7 +29,7 @@ var opts = stdio.getopt({ output: { key: "o", args: 1, description: "Output file", default: "" }, }); -if (opts.args.length != 1) { +if (!opts.args || opts.args.length != 1) { usage(); }