Skip to content
Myr

bug fixing: function normalize doesn't honor option terminator.

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

authored by abbr · committed by abbr · parent fa2ce5c · Browse files · 2 files+7 added−2 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+7 added−2 removed

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

2 files+7 added−2 removed

modified:test/test.options.hyphen.js+2 added-1 removed
modified:index.js+5 added-1 removed
439 unmodified lines
440 for (var i = 0, len = args.length; i < len; ++i) {441 arg = args[i];442 i > 0 && (lastOpt = this.optionFor(args[i-1]));443444 if(arg==='--'){445 // honor option terminator446 ret = ret.concat(args.slice(i));447 break;444 if (lastOpt && lastOpt.required) {448 } else if (lastOpt && lastOpt.required) {449 ret.push(arg);450 } else if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) {451 arg.slice(1).split('').forEach(function(c){452 ret.push('-' + c);
406 unmodified lines