Skip to content
Myr

Added support for --. Closes #24

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tj Holowaychuk · committed by Tj Holowaychuk · parent bbc53f9 · Browse files · 2 files+29 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+29 added−0 removed

  • tests:+15 added−0 removed
  • other:+14 added−0 removed

2 files+29 added−0 removed

modified:lib/commander.js+14 added
407 unmodified lines
408Command.prototype.parseOptions = function(argv){409 var args = []410 , argv = argv.slice(2)411 , len = argv.length412 , literal413 , option414 , arg;415416 // parse options417 for (var i = 0; i < len; ++i) {418 arg = argv[i];419420 // literal args after --421 if ('--' == arg) {422 literal = true;423 continue;424 }425426 if (literal) {427 args.push(arg);428 continue;429 }430431 // find matching Option432 option = this.optionFor(arg);433434 // option is defined435 if (option) {
491 unmodified lines
added:test/test.literal.args.js+15 added