Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.

BC: Add output file path argument#83

Merged
jkowalleck merged 5 commits into
CycloneDX:mainfrom
andreas-hilti:feat/output_file
Aug 2, 2023
Merged

BC: Add output file path argument#83
jkowalleck merged 5 commits into
CycloneDX:mainfrom
andreas-hilti:feat/output_file

Conversation

@andreas-hilti
Copy link
Copy Markdown
Contributor

@andreas-hilti andreas-hilti commented Apr 1, 2023

Allow to specify the output file path to which the SBOM is written on the command line, e.g.
cyclonedx-conan -l conan.lock conanfile.txt --output sbom.json

Allow to specify the output file path to which the SBOM is written to on the command line.

Signed-off-by: andreas hilti <andreas.hilti@bluewin.ch>
@andreas-hilti
Copy link
Copy Markdown
Contributor Author

@coderpatros @codetent This might address #52.

Signed-off-by: andreas hilti <andreas.hilti@bluewin.ch>
@jkowalleck jkowalleck added the enhancement New feature or request label Jul 28, 2023
@jkowalleck
Copy link
Copy Markdown
Member

could you also change the logs to be sent to stdError instead of stdOut?

@andreas-hilti
Copy link
Copy Markdown
Contributor Author

could you also change the logs to be sent to stdError instead of stdOut?

I haven't managed to sent it to stdError; all that I managed was to suppress it completely by setting quiet=True as an additional argument for the info command.

@andreas-hilti
Copy link
Copy Markdown
Contributor Author

@jkowalleck If we were to initialize the conan_api differently, say:

from conans.client.output import ConanOutput
conan_api = Conan(output=ConanOutput(sys.stderr, sys.stderr, None))

then we could redirect all the output to stderr; however, I'm not sure about side effects (even though I don't see any).

@jkowalleck
Copy link
Copy Markdown
Member

jkowalleck commented Jul 29, 2023

then we could redirect all the output to stderr; however, I'm not sure about side effects (even though I don't see any).

lets do this :-)
could you add the needed changes?

we could redirect logs to stdErr, have SBOM on stdOut, and then push a new major version and describe these breaking changes in the changelog.
I see no problem, workflow-wise.

Signed-off-by: andreas hilti <andreas.hilti@bluewin.ch>
@andreas-hilti
Copy link
Copy Markdown
Contributor Author

andreas-hilti commented Jul 29, 2023

lets do this :-) could you add the needed changes?

@jkowalleck I have added this change.

@jkowalleck jkowalleck changed the title Add output file path argument BC: Add output file path argument Aug 1, 2023
Signed-off-by: andreas hilti <andreas.hilti@bluewin.ch>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
@jkowalleck jkowalleck merged commit b1edf29 into CycloneDX:main Aug 2, 2023
jkowalleck added a commit that referenced this pull request Aug 2, 2023
via #83

BREAKING CHANGE

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
jkowalleck added a commit that referenced this pull request Aug 2, 2023
via #83

BREAKING CHANGE

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

breaking-change enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants