75lb / command-line-args

A mature, feature-complete library to parse command-line options.
MIT License
689 stars 106 forks source link

unknown "--option=value notation" value consumed as defaultOption #67

Closed 75lb closed 6 years ago

75lb commented 6 years ago

This output from this example is incorrect.

> const commandLineArgs = require('command-line-args')
> const definitions = [ { name: 'file', type: String, defaultOption: true } ]
> commandLineArgs(definitions, { partial: true, argv: [ '--two=3' ] })
{ file: '3', _unknown: [ '--two' ] }

It should result in this output:

{ _unknown: [ '--two=3' ] }
75lb commented 6 years ago

Fixed in v5.0.0.