Skip to content
Myr

Merge pull request #525 from JustATrick/allow-literal-passthrough

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

Allow literal '--' to be passed-through as an argument

authored by Zhiye Li · committed by GitHub · parents 7a281b9, d49573a · Browse files · 2 files+9 added−5 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+9 added−5 removed

  • tests:+5 added−1 removed
  • other:+4 added−4 removed

2 files+9 added−5 removed

modified:test/test.literal.args.js+5 added-1 removed
modified:index.js+4 added-4 removed
666 unmodified lines
667 for (var i = 0; i < len; ++i) {668 arg = argv[i];669670 // literal args after --671 if ('--' == arg) {672 literal = true;671 if (literal) {672 args.push(arg);673 continue;674 }675676 if (literal) {677 args.push(arg);676 if ('--' == arg) {677 literal = true;678 continue;679 }680681 // find matching Option
429 unmodified lines