Skip to content
Myr

Merge pull request #1018 from nazieb/develop

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

fix showing help for sub commands with custom executableFile

authored by John Gee · committed by GitHub · parents 8b8d6e6, bd8be00 · Browse files · 1 file+8 added−7 removed
This commit

State

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

Diff stats

1 file+8 added−7 removed

  • other:+8 added−7 removed

1 file+8 added−7 removed

modified:index.js+8 added-7 removed
456 unmodified lines
457 var args = this.args = parsed.args;458459 var result = this.parseArgs(this.args, parsed.unknown);460461 if (args[0] === 'help' && args.length === 1) this.help();462463 // <cmd> --help464 if (args[0] === 'help') {465 args[0] = args[1];466 args[1] = this._helpLongFlag;467 }468469 // executable sub-commands470 // (Debugging note for future: args[0] is not right if an action has been called)471 var name = result.args[0];472 var subCommand = null;
45 unmodified lines
518Command.prototype.executeSubCommand = function(argv, args, unknown, executableFile) {519 args = args.concat(unknown);520521 if (!args.length) this.help();514 if (args[0] === 'help' && args.length === 1) this.help();522516 // <cmd> --help517 if (args[0] === 'help') {518 args[0] = args[1];519 args[1] = this._helpLongFlag;520 }521523 var isExplicitJS = false; // Whether to use node to launch "executable"524525 // executable526 var pm = argv[1];
807 unmodified lines