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(cli): Fix the bug where the command description is not displayed. #19604

Merged
merged 3 commits into from Jun 28, 2023

Conversation

k-nasa
Copy link
Contributor

@k-nasa k-nasa commented Jun 25, 2023

WHY

fix: #19554

Fixed the issue where subcommands are not displayed.

WHAT

  • Move about and long_about out of the defer block.
  • Confirmed that subcommand descriptions are displayed as follows.
:) % ./target/debug/deno help
...
...

Commands:
  run          Run a JavaScript or TypeScript program
  bench        Run benchmarks
  bundle       Bundle module and dependencies into single file
  cache        Cache the dependencies
  check        Type-check the dependencies
  compile      UNSTABLE: Compile the script into a self contained executable
  completions  Generate shell completions
  coverage     Print coverage reports
  doc          Show documentation for a module
  eval         Eval script
  fmt          Format source files
  init         Initialize a new project
  info         Show info about cache or info related to source file
  install      Install script as an executable
  uninstall    
  lsp          Start the language server
  lint         Lint source files
  repl         
  task         Run a task defined in the configuration file
  test         Run tests
  types        Print runtime TypeScript declarations
  upgrade      Upgrade deno executable to given version
  vendor       Vendor remote modules into a local directory
  help         Print this message or the help of the given subcommand(s)
...
...

Comment on lines +822 to +823
.about("Run benchmarks")
.long_about(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The difference might be hard to see, but all I did was move it outside of the block.

@crowlKats
Copy link
Member

@k-nasa could we get a simple test?

@k-nasa
Copy link
Contributor Author

k-nasa commented Jun 26, 2023

Of course, I'll work it tonight.

Copy link
Member

@crowlKats crowlKats left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@crowlKats crowlKats merged commit d82b5f3 into denoland:main Jun 28, 2023
11 checks passed
@k-nasa
Copy link
Contributor Author

k-nasa commented Jun 28, 2023

Thanks for review

@k-nasa k-nasa deleted the k-nasa/fix_broken_help branch June 28, 2023 01:58
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.

Broken help text / command descriptions
2 participants