Commit 0a6775a
committed
fix: capture and display ai-reviewer.sh error messages in workflow
Previously, when ai-reviewer.sh failed with exit code 1, the workflow
would immediately stop due to shell errexit (-e flag) without displaying
the actual error message. This made debugging failures very difficult.
Changes:
- Temporarily disable errexit with 'set +e' before running ai-reviewer.sh
- Capture both stdout and stderr with '2>&1' redirection
- Store the exit code separately for inspection
- Re-enable errexit with 'set -e' after capture
- Check exit code and display full error output if non-zero
- Include exit code in debug output for better troubleshooting
This fix ensures that when the AI reviewer fails, users will see the
actual error message (e.g., "Missing OPENROUTER_API_KEY", "Diff too large",
"API call failed") instead of just "Error: Process completed with exit code 1".1 parent d03e896 commit 0a6775a
1 file changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
53 | 58 | | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
58 | 73 | | |
59 | 74 | | |
60 | 75 | | |
| |||
0 commit comments