dojo / cli

:rocket: Dojo - command line tooling.
http://dojo.io
Other
25 stars 34 forks source link

CLI defaults hinder sub commands #201

Closed tomdye closed 6 years ago

tomdye commented 6 years ago

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, 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.

agubler commented 6 years ago

I think this has been resolved with the changes to the CLI output renderer - Please re-open if this is not the case.