vorpal
vorpal copied to clipboard
Required options do not throw error
Regression of https://github.com/dthree/vorpal/issues/60
Broken on 1.10.0, 1.11.0 and 1.12.0
Confirmed working on 1.9.0
@toddpi314 Do you have a simple example of this occurring?
Hi, here what I ve found.
vorpal
.command('createUser')
.option('--email <email>', 'Email for new user. Must be unique')
.action(function (args, callback) {
const { email } = args;
this.log('Success !!!', email, canAccessKeystone);
callback();
});
In the code above I say, that email option is required, but in console I can just write command 'createUser' and it don't throw any error. I find, that is failed when I pass option without value. For me it work a little bit strange.