You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
For some reason I can't reproduce the issue on powershell unless I'm using Python's subprocess.run() method, but it seems to happen consistently on cmd. It looks like the issue is that we don't explicitly set the exit code if the tool encounters an argument parsing error.
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?

The text was updated successfully, but these errors were encountered: