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
I also have meta-apps for both the parent app and child apps. So top level app is stuff like logging format, logging level, etc. Then the child apps have more specific global options for all of the grouped child commands. The issue is the help does not display right for all child commands or the meta-apps are not executed.
Attempt 1
This leads to the only the top-level meta-app being called (meta_1 is never called):
meta_1 is called, but only the first two levels of --help to work (parent app works, child apps work, but child app commands do not work, it returns the help of the child app instead):
I never really intended meta apps to be nested this way, but I think it could work. A meta app is very similar to an independently declared App, it just gets special treatment relative to it's parent for the --help page. I think your Attempt 2 is closest to working. It's not exactly working as expected on my end; i'll try and open up a PR soon and we can continue discussion there.
I am basically just using meta-apps for app wide arguments. Like I mentioned, the top-level app is for stuff like logging level, output format, etc. Things that are useful for all commands. Then since the current project I am working on is basically a manager for a game server, it is still like hostname/IP, port, RCON port, RCON password, etc. Which that is all data that is shared between the commands in child app, but not the parent app.
Definitely a bug or maybe I am just doing things wrong.
I have a nested CLI app structure:
I also have meta-apps for both the parent app and child apps. So top level app is stuff like logging format, logging level, etc. Then the child apps have more specific global options for all of the grouped child commands. The issue is the help does not display right for all child commands or the meta-apps are not executed.
Attempt 1
This leads to the only the top-level meta-app being called (
meta_1
is never called):Attempt 2
meta_1
is called, but only the first two levels of--help
to work (parent app works, child apps work, but child app commands do not work, it returns the help of the child app instead):i.e.
app --help
works,app app_1 --help
works, butapp app_1 test --help
displays the help forapp_1
.The text was updated successfully, but these errors were encountered: