Fix coerce usage

This commit is contained in:
Sean Lilley 2021-07-22 19:42:28 -04:00
parent 2516510682
commit bf4f5fd973

View File

@ -25,6 +25,9 @@ const argv = yargs
type : 'string',
demandOption : true,
coerce : function (p) {
if (!defined(p)) {
return undefined;
}
if (p.length === 0) {
throw new Error('Input path must be a file name');
}
@ -36,6 +39,9 @@ const argv = yargs
describe : 'Path of the converted glTF or glb file.',
type : 'string',
coerce : function (p) {
if (!defined(p)) {
return undefined;
}
if (p.length === 0) {
throw new Error('Output path must be a file name');
}