Fix/improve dependency handling#65
Conversation
|
Hi @tamilari, please rebase this PR against the latest main branch, as we don't do merge commits in this project. Once done, please just force-push. |
34fc794 to
2a1ac77
Compare
|
CI is not working right now. Once #68 is merged, please rebase and I should be able to approve you. |
2fb5990 to
6c8250c
Compare
fmoessbauer
left a comment
There was a problem hiding this comment.
Regarding commit fix/improve missing dependency handling :
Please change the message to follow the conventional commits style.
src/debsbom/cli.py
Outdated
| if args.cmd == "generate": | ||
| GenerateCmd.run(args) | ||
| elif not HAS_DOWNLOAD_DEPS: | ||
| print(f"{MISSING_MODULE}. {args.cmd} not available", file=sys.stderr) |
There was a problem hiding this comment.
Please use the logger.error command for that to pass the message through the logging module.
There was a problem hiding this comment.
An alternative is to just throw a runtime error here which is then catched in the error handler. By that, you can avoid the explicit sys.exit(-1).
9f94730 to
64058f4
Compare
1aa69e2 to
8f7fcf6
Compare
- Show the download, source-merge, and repack commands in the help message, even if the dependencies are not installed. This ensures consistency across all systems - Display a missing dependency error message when an unavailable command is used - Require one of the four commands to be specified so that calling debsbom alone will display a usage error message - Always import Compression from .util, regardless of whether the download dependencies are installed. This ensures that the parser is always set up with the correct compression options and results in consistent help messages Closes siemens#75: debsbom without subcommand shows empty output Signed-off-by: Tamino Larisch <tamino.larisch@siemens.com>
8f7fcf6 to
c22e498
Compare
|
LGTM, what do you think @fmoessbauer? |
message, even if the dependencies are not installed. This ensures
consistency across all systems
is used
debsbom alone will display a usage error message
download dependencies are installed. This ensures that the parser is
always set up with the correct compression options and results in
consistent help messages