Adding the option values to the command object will only cause conflicts between the properties of the command object and of the command options.
Let's take this example:
program.option('--parse', 'parse');
program.option('--parse2', 'parse');
program.parse(['node', 'test', '--parse', '--parse2']);
console.log(program.parse); // undefined
console.log(program.parse2); // true
This seems like a pretty serious bug to me, certainly it's prevented me from naming my option 'parent' because of conflicts with this particular line: https://github.com/visionmedia/commander.js/blob/master/index.js#L155
Why can't the option values just be added to a new empty object?? Something like this;
program.option('--parse', 'parse');
program.option('--parse2', 'parse');
program.parse(['node', 'test', '--parse', '--parse2']);
console.log(program.input.parse); // true
console.log(program.input.parse2); // true
Adding the option values to the command object will only cause conflicts between the properties of the command object and of the command options.
Let's take this example:
This seems like a pretty serious bug to me, certainly it's prevented me from naming my option 'parent' because of conflicts with this particular line: https://github.com/visionmedia/commander.js/blob/master/index.js#L155
Why can't the option values just be added to a new empty object?? Something like this;