sbom-tool
sbom-tool copied to clipboard
unexpected input argument will prompt --help but exit_code still be 0
I am using run_subprocess function in python to invoke sbom-tool generate command. which given invalid input, it will prompt --help function, but exit_code is 0, which run_subprocess believe this command is executed successfully and continue to the next step.
Is there a way to tell the command got unexpected input and throw an exception instead of an exit_code = 0 return?