Skip to content

Fix early exit when processing a list of repos#71

Merged
Boomatang merged 1 commit into
mainfrom
bug_fix
May 20, 2026
Merged

Fix early exit when processing a list of repos#71
Boomatang merged 1 commit into
mainfrom
bug_fix

Conversation

@Boomatang

Copy link
Copy Markdown
Owner

Closes #70

Summary

  • Replace std.process.exit(1) calls inside the repo-processing loop with error returns so that a failure on one repo does not abort the rest
  • Add a run_failure flag to track whether any repo failed during processing
  • The process now continues processing remaining repos after encountering an error and exits with a nonzero code at the end if any failure occurred

Acceptance Criteria

The issue states: "When cloning a list of repos if one is existing the error causes the whole process to stop. This should not be the case. It should report the error but it should also continue to and process the rest of the list."

  • The clone(), worktree(), and addRemote() helper functions now return errors instead of calling std.process.exit(1), allowing the main loop to catch failures and continue to the next repo
  • Errors are logged before being returned to preserve diagnostic information for the user
  • A run_failure flag accumulates failure state across all repos, and std.process.exit(1) is called only after all repos have been attempted

Now a loop of repos will continue on error.

Signed-off-by: Jim Fitzpatrick <jfitzpat@redhat.com>
@Boomatang Boomatang merged commit fe30a54 into main May 20, 2026
2 checks passed
@Boomatang Boomatang deleted the bug_fix branch May 20, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Early exit

1 participant