aboutsummaryrefslogtreecommitdiff
path: root/node_modules/yargs/lib/validation.js
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-20 02:56:13 +0200
commitbbff7403fbf46f9ad92240ac213df8d30ef31b64 (patch)
treec58400ec5124da1c7d56b01aea83309f80a56c3b /node_modules/yargs/lib/validation.js
parent003fb34971cf63466184351b4db5f7c67df4f444 (diff)
update packages
Diffstat (limited to 'node_modules/yargs/lib/validation.js')
-rw-r--r--node_modules/yargs/lib/validation.js32
1 files changed, 0 insertions, 32 deletions
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()