I'm using Vorpal with the reduced test case below:
'use strict';
let cli = require('vorpal')();
cli
.command('test')
.description('reduced test case')
.option('--required <val>', 'Should be a required value')
.action(function(c) {
console.log(c.options.required);
});
cli.parse(process.argv);
node index test
This command's action should not execute using the given command, as no --required value was specified. According to the current source in lib/util.js:199, missing required options shows a message in the console along with help. This does not happen.
I'm using Vorpal with the reduced test case below:
This command's action should not execute using the given command, as no
--required
value was specified. According to the current source in lib/util.js:199, missing required options shows a message in the console along with help. This does not happen.