mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2024-11-23 08:34:14 -05:00
Merge pull request #139 from AnalyticalGraphicsInc/empty-input-output
Handle empty -i -o arguments in CLI
This commit is contained in:
commit
26526c0f51
@ -23,14 +23,24 @@ var argv = yargs
|
||||
alias : 'i',
|
||||
describe : 'Path to the obj file.',
|
||||
type : 'string',
|
||||
normalize : true,
|
||||
demandOption : true
|
||||
demandOption : true,
|
||||
coerce : function (p) {
|
||||
if (p.length === 0) {
|
||||
throw new Error('Input path must be a file name');
|
||||
}
|
||||
return path.resolve(p);
|
||||
}
|
||||
},
|
||||
output : {
|
||||
alias : 'o',
|
||||
describe : 'Path of the converted glTF or glb file.',
|
||||
type : 'string',
|
||||
normalize : true
|
||||
coerce : function (p) {
|
||||
if (p.length === 0) {
|
||||
throw new Error('Output path must be a file name');
|
||||
}
|
||||
return path.resolve(p);
|
||||
}
|
||||
},
|
||||
binary : {
|
||||
alias : 'b',
|
||||
|
Loading…
Reference in New Issue
Block a user