Skip to content
Myr

Remove illegal passThroughOptions check deemed unnecessary

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

authored by Wee Bit · committed by Abe Tomoaki · parent af67d11 · Browse files · 2 files+0 added−14 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+0 added−14 removed

  • tests:+0 added−11 removed
  • other:+0 added−3 removed

2 files+0 added−14 removed

modified:lib/command.js-3 removed
721 unmodified lines
722 * @param {Boolean} [positional=true]723 */724 enablePositionalOptions(positional = true) {725 this._enablePositionalOptions = !!positional;726 this.commands.forEach((command) => {727 this._checkForIllegalPassThroughOptions(command, this);728 });726 return this;727 }728729 /**
1479 unmodified lines
modified:tests/command.positionalOptions.test.js-11 removed
379 unmodified lines
380 expect(() => {381 program.addCommand(sub);382 }).toThrow();383 });384385 test('when program has subcommand with passThroughOptions and reset to non-positional then error', () => {386 const program = new commander.Command()387 .enablePositionalOptions();388 program.command('sub')389 .passThroughOptions();390391 expect(() => {392 program.enablePositionalOptions(false);393 }).toThrow();394 });384});385386// ------------------------------------------------------------------------------387
140 unmodified lines