Closed lilleyse closed 6 years ago
Gives more helpful error messages if -i or -o are passed to the command line but are not followed by a filename.
-i
-o
Example: obj2gtlf -i file.obj -o will print Output path must be a filename Example: obj2gtlf -i will print Input path is required
obj2gtlf -i file.obj -o
Output path must be a filename
obj2gtlf -i
Input path is required
I'd prefer if this check could be done from the yargs side. Does anyone know if yargs can demand a string option to be greater than zero length?
Looks good. Thanks @lilleyse.
Gives more helpful error messages if
-i
or-o
are passed to the command line but are not followed by a filename.Example:
obj2gtlf -i file.obj -o
will printOutput path must be a filename
Example:obj2gtlf -i
will printInput path is required
I'd prefer if this check could be done from the yargs side. Does anyone know if yargs can demand a string option to be greater than zero length?