Commit 5cfaecc
fix(git): propagate exit codes in push/pull/fetch/stash/worktree (#234)
run_push, run_pull, run_fetch, run_stash (pop/apply/drop/push and
default), and run_worktree all printed FAILED messages on error but
returned Ok(()) instead of propagating git's exit code.
This breaks CI/CD pipelines and shell scripts that rely on exit code
semantics (e.g. `git push || handle_error`).
Fix: call std::process::exit(output.status.code().unwrap_or(1)) in
each failure branch, matching the pattern already used in run_log,
run_diff, run_add, and run_branch.
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 44cb9ec commit 5cfaecc
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
800 | 800 | | |
801 | 801 | | |
802 | 802 | | |
| 803 | + | |
803 | 804 | | |
804 | 805 | | |
805 | 806 | | |
| |||
885 | 886 | | |
886 | 887 | | |
887 | 888 | | |
| 889 | + | |
888 | 890 | | |
889 | 891 | | |
890 | 892 | | |
| |||
1063 | 1065 | | |
1064 | 1066 | | |
1065 | 1067 | | |
1066 | | - | |
| 1068 | + | |
1067 | 1069 | | |
1068 | 1070 | | |
1069 | 1071 | | |
| |||
1163 | 1165 | | |
1164 | 1166 | | |
1165 | 1167 | | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
1166 | 1172 | | |
1167 | 1173 | | |
1168 | 1174 | | |
| |||
1195 | 1201 | | |
1196 | 1202 | | |
1197 | 1203 | | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
1198 | 1208 | | |
1199 | 1209 | | |
1200 | 1210 | | |
| |||
1265 | 1275 | | |
1266 | 1276 | | |
1267 | 1277 | | |
| 1278 | + | |
1268 | 1279 | | |
1269 | 1280 | | |
1270 | 1281 | | |
| |||
0 commit comments