Comparing version 2.0.4 to 2.0.5
@@ -27,3 +27,5 @@ "use strict"; | ||
if (option.required) { | ||
throw new cmd_args_1.ParseError(`Missing required option ${option.key}.`, parsedOptions); | ||
throw new cmd_args_1.ParseError(option.type === 'env' | ||
? `Missing required env var ${option.env}` | ||
: `Missing required option ${option.key}.`, parsedOptions); | ||
} | ||
@@ -30,0 +32,0 @@ else { |
{ | ||
"name": "cmd-args", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "A simple command-line argument parser for NodeJS command-line tools.", | ||
@@ -5,0 +5,0 @@ "main": "dist/cmd-args.js", |
@@ -33,3 +33,5 @@ import { CommandInternal, ParsedOptions } from './types' | ||
throw new ParseError( | ||
`Missing required option ${option.key}.`, | ||
option.type === 'env' | ||
? `Missing required env var ${option.env}` | ||
: `Missing required option ${option.key}.`, | ||
parsedOptions | ||
@@ -36,0 +38,0 @@ ) |
Sorry, the diff of this file is not supported yet
67499
1422