Use default values

This commit is contained in:
Sean Lilley 2016-06-23 21:21:21 -04:00
parent 85f035db19
commit 462c80fbc0

View File

@ -18,8 +18,8 @@ if (process.argv.length < 3 || defined(argv.h) || defined(argv.help)) {
var objFile = defaultValue(argv._[0], defaultValue(argv.i, argv.input)); var objFile = defaultValue(argv._[0], defaultValue(argv.i, argv.input));
var outputPath = defaultValue(argv._[1], defaultValue(argv.o, argv.output)); var outputPath = defaultValue(argv._[1], defaultValue(argv.o, argv.output));
var binary = defaultValue(argv.b, argv.binary); var binary = defaultValue(defaultValue(argv.b, argv.binary), false);
var embed = defaultValue(argv.e, argv.embed); var embed = defaultValue(defaultValue(argv.e, argv.embed), false);
if (!defined(objFile)) { if (!defined(objFile)) {
throw new Error('-i or --input argument is required. See --help for details.'); throw new Error('-i or --input argument is required. See --help for details.');