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

Command-line help not working #3474

Closed
jamesshore opened this issue Apr 16, 2020 · 2 comments · Fixed by #3502 or karronoli/redpen#10 · May be fixed by Omrisnyk/npm-lockfiles#136, Omrisnyk/npm-lockfiles#137 or Omrisnyk/npm-lockfiles#139
Closed
Labels

Comments

@jamesshore
Copy link
Contributor

jamesshore commented Apr 16, 2020

Expected behaviour

When I run karma --help from the command line, I should see the CLI help text.

When I run karma [command] --help, I should see help text specific to that command.

Actual behaviour

When I run karma --help, I see the following:

$ node_modules/.bin/karma --help
Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

When I run karma on its own, I see the following:

$ node_modules/.bin/karma
Command not specified.
Karma - Spectacular Test Runner for JavaScript.

Usage:
  karma <command>

Commands:
  start [<configFile>] [<options>] Start the server / do single run.
  init [<configFile>] Initialize a config file.
  run [<options>] [ -- <clientArgs>] Trigger a test run.
  completion Shell completion for karma.

Run --help with particular command to see its description and available options.

Options:
  --help     Print usage and options.                                  [boolean]
  --version  Print current version.                                    [boolean]

When I run karma start --help (or any other command), I see the following:

$ node_modules/.bin/karma start --help
Options:
  --help     Show help                                                 [boolean]
  --version  Show version number                                       [boolean]

Environment Details

  • Karma version (output of karma --version): 5.0.2
  • Relevant part of your karma.config.js file: not applicable

Steps to reproduce the behaviour

  1. Run karma --help
  2. Run karma start --help
@devoto13
Copy link
Collaborator

I can reproduce it and I am working on a fix.

devoto13 added a commit to devoto13/karma that referenced this issue May 7, 2020
These were lost after migration to yargs as CLI parser.

Fixes karma-runner#3474
johnjbarton pushed a commit that referenced this issue May 7, 2020
These were lost after migration to yargs as CLI parser.

Fixes #3474
karmarunnerbot pushed a commit that referenced this issue May 7, 2020
## [5.0.5](v5.0.4...v5.0.5) (2020-05-07)

### Bug Fixes

* **cli:** restore command line help contents ([#3502](#3502)) ([e99da31](e99da31)), closes [#3474](#3474)
@karmarunnerbot
Copy link
Member

🎉 This issue has been resolved in version 5.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

anthony-redFox pushed a commit to anthony-redFox/karma that referenced this issue May 16, 2023
These were lost after migration to yargs as CLI parser.

Fixes karma-runner#3474
anthony-redFox pushed a commit to anthony-redFox/karma that referenced this issue May 16, 2023
## [5.0.5](karma-runner/karma@v5.0.4...v5.0.5) (2020-05-07)

### Bug Fixes

* **cli:** restore command line help contents ([karma-runner#3502](karma-runner#3502)) ([e99da31](karma-runner@e99da31)), closes [karma-runner#3474](karma-runner#3474)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment