You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.
Given a multi-command CLI with the following structure:
bin/
run
src/
commands/
toplevel/
index.js
subcommand.js
index.js
Running ./bin/run toplevel --help will display the subcommand in the help message:
COMMANDS
toplevel:subcommand Describe the command here
However, running ./bin/run toplevel -h does not display the subcommand in its help message. The section is omitted.
This appears to be because the help message is displayed via two separate code paths; running the command with --help calls into Main#_help() and using -h calls into Command#_help(). Why are there two methods that do different things for command help?
The text was updated successfully, but these errors were encountered:
It might be possible to consolidate, but the reason there is separate logic is that one displays help for an entered argv input (which could be something like heroku help apps or heroku apps --help). The other one is for displaying the help once we know what the command is going to be.
This is definitely a bug though. The subcommands should always be listed under -h.
Given a multi-command CLI with the following structure:
Running
./bin/run toplevel --help
will display the subcommand in the help message:However, running
./bin/run toplevel -h
does not display the subcommand in its help message. The section is omitted.This appears to be because the help message is displayed via two separate code paths; running the command with
--help
calls intoMain#_help()
and using-h
calls intoCommand#_help()
. Why are there two methods that do different things for command help?The text was updated successfully, but these errors were encountered: