| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
execute_commands swallowed a non-zero restore exit (shell() returns None) into an empty-string success, so restore() never returned None and the --stop-on-error escalation in _try_restore_dependencies was unreachable. Treat a None from shell() as a failed command and propagate None. Add tests exercising the real execute_commands with only shell() mocked, covering the failure sentinel the previous mocked tests skipped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Problem
A restore command failing with a non-zero exit code (e.g. poetry lock exit 1) did not stop the scan, even with --stop-on-error.
Root cause — failure-sentinel mismatch:
Fix
execute_commands now treats shell() → None as a failed command and returns None (short-circuiting remaining commands). Propagation is restored: fail → None all the way up → FileCollectionError raised under --stop-on-error.
Tests
Existing stop-on-error tests all mocked execute_commands → None, so they never covered the production path where a real non-zero exit produced ''. Added:
All 27 SCA restore/collector tests pass.
🤖 Generated with Claude Code