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

Help is in the wrong order? #382

Open
Gilesey opened this issue Jul 26, 2024 · 1 comment
Open

Help is in the wrong order? #382

Gilesey opened this issue Jul 26, 2024 · 1 comment

Comments

@Gilesey
Copy link

Gilesey commented Jul 26, 2024

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.
@andreas-hilti
Copy link
Contributor

andreas-hilti commented Aug 1, 2024

This seems to come directly from System.CommandLine (see https://learn.microsoft.com/en-us/dotnet/standard/commandline/). I did not see what is causing it or how it could be changed.

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

No branches or pull requests

2 participants