redballoonsecurity / ofrak

OFRAK: unpack, modify, and repack binaries.
https://ofrak.com
Other
1.85k stars 127 forks source link

Remove CalledProcessError from `is_tool_installed` #289

Closed marczalik closed 1 year ago

marczalik commented 1 year ago

One sentence summary of this PR (This should go in the CHANGELOG!) Fix bug where Component External Tool would raise an error when checking whether a tool was installed returned a non-zero exit value

Link to Related Issue(s) N/A

Please describe the changes in your request. Remove checks against returncode in subprocess calls for is_tool_installed methods that would raise a CalledProcessError. Add test case to check return value of is_tool_installed when attempting to check for tool with known bad flag that will return non-zero exit code.

Anyone you think should look at this, specifically? @whyitfor