Describe the bug
When the output-file contains a path, then the generation fails.
I want to place the result of the sbom not in the root directory, but in a dedicated build folder for further processing in the pipeline.
To Reproduce
The following call
cyclonedx-npm --output-file build/reports/sbom.json
will cause an ERROR and no sbom is generated.
Error: ENOENT: no such file or directory, open '<path>/build/reports/sbom.json'
Process finished with exit code 254
Expected behavior
The folders are generated if the --output-file argument contains a path.
Environment
- @cyclonedx/cyclonedx-npm version: 1.19.3
- NPM version: 10.9.0
- Node version: v23.1.0
- OS: mac
Describe the bug
When the
output-filecontains a path, then the generation fails.I want to place the result of the sbom not in the root directory, but in a dedicated build folder for further processing in the pipeline.
To Reproduce
The following call
will cause an ERROR and no sbom is generated.
Expected behavior
The folders are generated if the
--output-fileargument contains a path.Environment