Skip to content

Commit

Permalink
Fix case where _unknown is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
perrin4869 committed Nov 30, 2021
1 parent 7165bd4 commit a69bde1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/command-line-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default (argv, defaults) => {
const { cmd, _unknown: unknown } = commandLineArgs(commandDefinitions, { stopAtFirstUnknown: true, argv });
const { command, definitions = [], constants = {} } = parse(cmd, defaults);

const args = commandLineArgs([...definitions, ...optionDefinitions(defaults)], { argv: unknown });
const args = commandLineArgs([...definitions, ...optionDefinitions(defaults)], { argv: unknown || [] });
if (args.ssl === null && defaults.ssl === undefined) { // If no value is handed, treat it as boolean
args.ssl = true;
}
Expand Down

0 comments on commit a69bde1

Please sign in to comment.