Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help command not respecting executableFile option #1025

Closed
Piccirello opened this issue Aug 22, 2019 · 2 comments
Closed

help command not respecting executableFile option #1025

Piccirello opened this issue Aug 22, 2019 · 2 comments

Comments

@Piccirello
Copy link

Using commander v3.0.0, I have a command that specifies the executableFile option:

program
  .name("testapp")
  .version("1.0.0")
  .command("list <type>", "List available configuration", { executableFile: 'cli/list' })

The list command in cli/list.js specifies its name and some subcommands (only one listed for brevity):

program
  .name("list")
  .description("List available configuration")
  .command("secrets", "Print all available secret types", { executableFile: 'list-secrets' })

Calling testapp list --help works as expected, but testapp help list throws an error. It appears help is trying to load cli-list.js rather than the file specified by executableFile.

$ testapp list --help
Usage: list [options] [command]

List available configuration

Options:
  -h, --help       output usage information

Commands:
  secrets          Print all available secret types
  help [cmd]       display help for [cmd]
$ testapp help list
error: cli-list(1) does not exist, try --help
@shadowspawn
Copy link
Collaborator

Thanks for the clear report and reproduce detail.

There is a Pull Request (thanks to @nazieb) which has been accepted onto the develop branch which should fix this: #1018

We have some other PR close to ready, but I think we might ship a v3.0.1 and not wait. It is great that people are using the new configuration option. I'll fix the TypeScript omission and then we could ship soon @abetomo ?

@Piccirello
Copy link
Author

Excellent! Thanks for the heads up @shadowspawn, and for the fix @nazieb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants