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

Fix project commands declaration #1116

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brandenrodgers
Copy link
Contributor

Description and Context

We were not following the pattern defined in our other commands. We define subcommands using the pattern yargs.command(subcommand).demandCommand(1, '').

The result of this is a more useful CLI output when the user runs hs project without specifying any subcommands. The empty string is necessary because the demandCommand() function requires two arguments. Using an empty string forces it to fall back to logging out the --help output.

Screenshots

Before

image

After

image

TODO

Who to Notify

yargs.command(open).demandCommand(0, '');
yargs.command(migrateApp).demandCommand(0, '');
yargs.command(cloneApp).demandCommand(0, '');
yargs
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

Copy link
Contributor

@camden11 camden11 left a comment

Choose a reason for hiding this comment

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

huge

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.

None yet

3 participants