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

Better handle calling help on non existent commands #267

Closed
wants to merge 3 commits into from

Conversation

JamesLMilner
Copy link
Contributor

@JamesLMilner JamesLMilner commented Oct 7, 2018

Type: bug

The following has been addressed in the PR:

Description:

At the moment the CLI returns the help template on non existent commands. This PR fixes that.

Resolves #266

screenshot_20181015_115521

@JamesLMilner JamesLMilner changed the title Throw an error if getting help on non existant commands Better handle calling help on non existent commands Oct 7, 2018
@agubler
Copy link
Member

agubler commented Oct 8, 2018

@JamesMilnerUK how does this actually look in the command output?

@@ -217,6 +217,13 @@ export default function(yargs: Argv, groupMap: GroupMap): void {
return dojoYargs;
},
(argv: any) => {
const isGroupCommand = argv._.length && argv._.length > 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just !!argv._.length or Boolean(argv._.length) would do I think

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Someone was talking about this yesterday, I think Boolean(argv._.length) is nicer but that's just me :)

@JamesLMilner
Copy link
Contributor Author

I am reworking this to show the full main help, with an additional warning message in red, rather than just showing a simple error message.

@JamesLMilner
Copy link
Contributor Author

Closing in favour of #269

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

Successfully merging this pull request may close these issues.

Dojo CLI will return help for none existent commands
3 participants