From bbff7403fbf46f9ad92240ac213df8d30ef31b64 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Sep 2018 02:56:13 +0200 Subject: update packages --- node_modules/yargs/lib/validation.js | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'node_modules/yargs/lib/validation.js') diff --git a/node_modules/yargs/lib/validation.js b/node_modules/yargs/lib/validation.js index 1eee2fb02..f4655b4fd 100644 --- a/node_modules/yargs/lib/validation.js +++ b/node_modules/yargs/lib/validation.js @@ -54,38 +54,6 @@ module.exports = function validation (yargs, usage, y18n) { } } - // make sure that any args that require an - // value (--foo=bar), have a value. - self.missingArgumentValue = function missingArgumentValue (argv) { - const defaultValues = [true, false, ''] - const options = yargs.getOptions() - - if (options.requiresArg.length > 0) { - const missingRequiredArgs = [] - - options.requiresArg.forEach((key) => { - const value = argv[key] - - // if a value is explicitly requested, - // flag argument as missing if it does not - // look like foo=bar was entered. - if (~defaultValues.indexOf(value) || - (Array.isArray(value) && !value.length)) { - missingRequiredArgs.push(key) - } - }) - - if (missingRequiredArgs.length > 0) { - usage.fail(__n( - 'Missing argument value: %s', - 'Missing argument values: %s', - missingRequiredArgs.length, - missingRequiredArgs.join(', ') - )) - } - } - } - // make sure all the required arguments are present. self.requiredArguments = function requiredArguments (argv) { const demandedOptions = yargs.getDemandedOptions() -- cgit v1.2.3