Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Fix usage message (closes #25441) #25442

Merged
merged 3 commits into from Jun 23, 2022
Merged

Conversation

claytonrcarter
Copy link
Contributor

Identify the Bug

This fixes #25441.

Description of the Change

The commit should be self explanatory, but the summary is:

  • atom -h produces actual output
  • atom --help produces correct output
  • atom -h and atom --help both produce the same output
  • the description (in the usage message) for -h/--help is corrected
  • -v/--version are correctly included in the usage message

Alternate Designs

I did not consider alternate designs b/c these fixes were pretty straightforward.

Possible Drawbacks

None that I can think of. This only corrects defects.

Verification Process

I have built and tested this locally, by hand.

Release Notes

When launched from the CLI, the -h and --help flags will now display the correct usage message.

… parsed

yargs depends on an intact console.log to display help and usage messages,
so just delay the override by a few statements.
The second call to yargs should be responsible for printing the main usage
message. This also fixes the `--help` description w/i the usage message,
which was only using the yargs default description.
@DeeDeeG
Copy link
Contributor

DeeDeeG commented Jun 19, 2022

Hi @claytonrcarter, I appreciate this fix and wanted to add it to the community fork.

Did you want to re-submit this PR there, or can I submit it on your behalf? (I'd point people to this as the original PR and use the same commits in the new PR.)

(A note just to be clear to anyone reading this: the community fork has no official relationship with official Atom, and I am not related to or involved in the official Atom team. I am just an independent community contributor to Atom like anyone else who posts PRs here.)

@claytonrcarter
Copy link
Contributor Author

I don't see myself having time to do so soon, so if you're set up to submit it for me, please feel free to do so. Good luck on the community fork!

@darangi darangi merged commit 17a31e3 into atom:master Jun 23, 2022
@darangi
Copy link
Contributor

darangi commented Jun 23, 2022

Thanks for the contribution 🙇🏾

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: -h and --help produce different output, both incorrect
3 participants