Print the "invalid value" for `output` in CLI flags
See original GitHub issueFAQ
- Yes, my issue is not about variability or throttling.
- Yes, my issue is not about a specific accessibility audit (file with axe-core instead).
URL
What happened?
$ npx lighthouse --output=json --output=html https://www.google.com throws Invalid values. Argument ‘output’ must be an array from choices “json”, “html”, “csv”
node: v12.22.3 “lighthouse”: “8.1.0”
What did you expect?
It to run.
What have you tried?
No response
How were you running Lighthouse?
CLI
Lighthouse Version
8.1.0
Chrome Version
No response
Node Version
12.22.3
Relevant log output
Invalid values. Argument 'output' must be an array from choices "json", "html", "csv"
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Control fmt.Parse output on Parsing Error - Stack Overflow
You can set the output (an io.Writer ) where error messages are printed with the FlagSet.SetOutput() method. You can set a bytes.
Read more >`conda run` verbosity and output control flags are confusing ...
Every command that exits non-zero displays this very annoying error message (although it's probably only so annoying because I've been using conda-run so...
Read more >CS 11: How to write usage statements
If a program is called with incorrect command-line arguments, it should detect that fact and print a usage statement to the terminal.
Read more >Printing and Colors - Typer - tiangolo
It will show the output normally: fast →python main.py. Hello World ... You can print to "standard error" creating a Rich Console with...
Read more >argparse — Parser for command-line options, arguments and ...
The program defines what arguments it requires, and argparse will figure out how to parse those out of sys.argv . The argparse module...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Go for it @svkrclg!
Basically in https://github.com/GoogleChrome/lighthouse/blob/233c56ec5cc95fdbd0db32885741732da2e74e3e/lighthouse-cli/cli-flags.js#L364-L374
you’ll want to add the value that failed validation to our error message instead of just a generic one 😃
This has been solved by #12836, thanks @rohan-kulkarni-25!