sbom-tool icon indicating copy to clipboard operation
sbom-tool copied to clipboard

unexpected input argument will prompt --help but exit_code still be 0

Open zongtaol opened this issue 1 year ago • 1 comments

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? Screenshot 2024-03-05 134828

zongtaol avatar Mar 05 '24 21:03 zongtaol