cyclonedx-cli icon indicating copy to clipboard operation
cyclonedx-cli copied to clipboard

Help is in the wrong order?

Open Gilesey opened this issue 7 months ago • 1 comments

As you can see here, much of the help starts with this pattern

cyclonedx [options] command

Yet you can't put the options before the command, you'll get an error.

It should read

cyclonedx command [options]

c:\temp\cyclone>c:\tools\cyclonedx --input-file MergedBOMs.json validate
--input-file' was not matched. Did you mean one of the following?
--input-file
Unrecognized command or argument '--input-file'
Unrecognized command or argument 'MergedBOMs.json'

validate
  Validate a BOM

Usage:
  cyclonedx [options] validate

Options:
  --input-file <input-file>                        Input BOM filename, will read from stdin if no value provided.
  --input-format <autodetect|json|xml>             Specify input file format.
  --input-version <v1_0|v1_1|v1_2|v1_3|v1_4|v1_5>  Specify input file specification version (defaults to v1.4)
  --fail-on-errors                                 Fail on validation errors (return a non-zero exit code)
  -?, -h, --help                                   Show help and usage information


c:\temp\cyclone>c:\tools\cyclonedx validate --input-file MergedBOMs.json
BOM validated successfully.

Gilesey avatar Jul 26 '24 07:07 Gilesey