Our implementation of sub commands using a default command is causing problems when a defualt command takes arguments.
In the scenario where you have @dojo/cli-create-app and @dojo/cli-create-theme installed, running dojo create theme actually matches against the default app as it compares theme to it's -n argument. It appears to be working, but the error message you see if actually the missing -n message from cli-create-app.
We have been blissfully unaware of this issue thus far as both create commands take the same -n argument but this has became apparent when adding command discoverability to the cli.
When the command discoverability PR lands, if you only have cli-create-app installed, when you type dojo you will see that create app, create theme and create widget are available, however if you type dojo create theme you will see the create app error message with the create theme description (very confusing). Only upon typing dojo create theme -n foo will the user be presented with the To install this command run npm i @dojo/cli-create-theme message.
We should drop default commands from the CLI and ensure that the sub command lists still display.
This bug should be addressed in the cli re-write or sooner if a quick solution is found.
Bug
Our implementation of sub commands using a default command is causing problems when a defualt command takes arguments. In the scenario where you have
@dojo/cli-create-app
and@dojo/cli-create-theme
installed, runningdojo create theme
actually matches against the default app as it comparestheme
to it's-n
argument. It appears to be working, but the error message you see if actually the missing-n
message fromcli-create-app
. We have been blissfully unaware of this issue thus far as both create commands take the same-n
argument but this has became apparent when adding command discoverability to the cli.When the command discoverability PR lands, if you only have
cli-create-app
installed, when you typedojo
you will see thatcreate app
,create theme
andcreate widget
are available, however if you typedojo create theme
you will see thecreate app
error message with thecreate theme
description (very confusing). Only upon typingdojo create theme -n foo
will the user be presented with theTo install this command run npm i @dojo/cli-create-theme
message.We should drop default commands from the CLI and ensure that the sub command lists still display. This bug should be addressed in the cli re-write or sooner if a quick solution is found.