ts-command-line-args
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -43,3 +43,3 @@ "use strict"; | ||
} | ||
else { | ||
else if (missingArgs.length > 0) { | ||
printMissingArgErrors(missingArgs, logger, options.baseCommand); | ||
@@ -46,0 +46,0 @@ printUsageGuideMessage(__assign(__assign({}, options), { logger: logger }), options.helpArg != null ? optionList.filter(function (option) { return option.name === options.helpArg; })[0] : undefined); |
{ | ||
"name": "ts-command-line-args", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "A thin Typescript wrapper around command-line-args", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -98,5 +98,6 @@ import { ArgumentConfig } from './contracts'; | ||
it('when optional values are ommitted', () => { | ||
const result = parse(getConfig(), { | ||
const result = parse(getHelpConfig(), { | ||
logger: mockConsole.mock, | ||
argv: [...requiredString, ...requiredArray], | ||
helpArg: 'optionalHelpArg', | ||
}); | ||
@@ -110,2 +111,5 @@ | ||
}); | ||
expect(mockConsole.withFunction('log')).wasNotCalled(); | ||
expect(mockConsole.withFunction('error')).wasNotCalled(); | ||
}); | ||
@@ -112,0 +116,0 @@ }); |
@@ -27,3 +27,3 @@ import { ArgumentConfig, ParseOptions, UnkownProperties, PropertyOptions } from './contracts'; | ||
logger.log(usageGuide); | ||
} else { | ||
} else if (missingArgs.length > 0) { | ||
printMissingArgErrors(missingArgs, logger, options.baseCommand); | ||
@@ -30,0 +30,0 @@ printUsageGuideMessage( |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67481
1183