Commit 9f0ef6c
vfmt: prioritize internal error exit code (5) over format-diff exit codes (#26857)
When vfmt encounters both internal errors (e.g. TCC crash processing one
file) and format differences in other files, the old code combined exit
codes: 2 (format diffs with -c) + 5 (internal error) = 7. Exit code 7
is not handled by CI checks that tolerate `exit_code -ne 5`, causing
false failures.
Fix: when has_internal_error is true, exit(5) immediately before
evaluating format-diff errors. The caller already retries with a better
backend when exit code is 5; producing 7 prevents that recovery.
Fixes: #26853 (Format vlang/v-analyzer CI step)
Co-authored-by: Richard Wheeler <18647491+PythonWillRule@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 3f7b77d commit 9f0ef6c
1 file changed
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
152 | 157 | | |
153 | 158 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
158 | 163 | | |
159 | 164 | | |
160 | | - | |
| 165 | + | |
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
| |||
0 commit comments