I want a command with extraneous arguments to raise an error. For example:
node script.js args-not-supported
This should produce some kind of error, I guess like:
Options:
--help Show help [boolean]
--version Show version number [boolean]
Too many non-option arguments
Is this possible? I thought the following code would do it but it does not produce an error at all.
var yargs = require('yargs');
yargs
.help('help')
.demand(0)
.strict()
.argv;
I want a command with extraneous arguments to raise an error. For example:
This should produce some kind of error, I guess like:
Is this possible? I thought the following code would do it but it does not produce an error at all.