mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-07 09:10:55 +00:00
* fix: add error logging to empty catch blocks in test helpers Previously, test helper functions had 14 empty catch blocks that silently swallowed all errors during cleanup operations (reading and deleting temporary stderr files). This change adds error logging that: - Allows expected errors (ENOENT for missing files, exit code 1 for cat) - Logs unexpected errors to console for debugging This improves test reliability by surfacing unexpected filesystem or permission errors that could indicate real problems, while still allowing the intended best-effort cleanup behavior. Fixes: Empty catch blocks in 6 test files Impact: Better test debugging and error visibility Agent: code-health Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: improve error handling in Python fallback and directory deletion 1. Python arithmetic fallback (shared/common.sh:713): - Changed from: || echo "$((elapsed + 1))" - Changed to: explicit if/else with error detection - Impact: Python errors are now properly caught instead of masked by || 2. Unvalidated directory deletion (cli/install.sh:142): - Added path validation before rm -rf - Checks: path is within dest directory AND directory exists - Impact: Prevents accidental deletion if variables are malformed Both changes improve safety and error visibility without breaking existing functionality. Agent: code-health Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: spawn-bot <bot@openrouter.ai> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| common.sh | ||
| github-auth.sh | ||
| key-request.sh | ||