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

If no command is given show help text; and instructions on sub-help. Include a dev quick start in the README #429

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

cleve-fauna
Copy link
Contributor

@cleve-fauna cleve-fauna commented Nov 22, 2024

Ticket(s): FE-6153

Problem

If no command is given we are showing some generic red text.

Screenshot 2024-11-22 at 3 37 18 PM

Solution

Instead just show help, and how to get more detailed help
Screenshot 2024-11-22 at 4 20 02 PM

Result

No weird errors shown.

Out of scope

We should do the same thing for missing sub commands.

Tracking here: https://faunadb.atlassian.net/browse/FE-6154

Testing

Ran the suite.

@cleve-fauna cleve-fauna requested a review from a team November 22, 2024 21:21
```
npm install
npm run build
./src/user-entrypoint.mjs
Copy link
Contributor

Choose a reason for hiding this comment

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

You can use this without having a build so in this example...build isn't necessary. So depending on what your intent here is, you may need to change this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Tests require builds (b/c we assert things on the behavior of the prod bundle), so I think it's reasonable to include?

Copy link
Contributor Author

@cleve-fauna cleve-fauna Nov 22, 2024

Choose a reason for hiding this comment

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

i put this in to make sure your stuff wasn't roont.

Make sense?

Cause my stuff was roont.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'll add some comments so noone else brain freezes when they read it.

@@ -40,7 +40,7 @@ describe("cli operations", function () {
});

// TODO: this doesn't work because turning on strict mode breaks parsing sub-commands. why?
it("should exit with a helpful message if a non-existant command is provided", async function () {
it("should exit with a helpful message if a non-existent command is provided", async function () {
Copy link
Collaborator

Choose a reason for hiding this comment

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

oopsie

@echo-bravo-yahoo echo-bravo-yahoo merged commit 7204707 into v3 Nov 22, 2024
4 checks passed
@echo-bravo-yahoo echo-bravo-yahoo deleted the main_noCommandGivenReadmeQuickStart branch November 22, 2024 21:39
@cleve-fauna cleve-fauna mentioned this pull request Dec 5, 2024
This was referenced Dec 6, 2024
@cleve-fauna cleve-fauna mentioned this pull request Dec 13, 2024
@mwilde345 mwilde345 mentioned this pull request Dec 18, 2024
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.

3 participants