Repository navigation
fix(repo-walker): exit 1 when a repo fails - #7
Merged
Merged
Conversation
added 2 commits
October 15, 2026 14:56
my-repos and beacon-repos printed "Failed: N" and exited 0, so a caller checking the exit status saw success. allup worked around this by parsing the summary text (dotfiles#432). repo_walker_main now returns 1 when any repo failed its status check, switch, pull or branch restore. Dirty repos are still skipped with exit 0, and report-only lookups do not change the status. The wrappers call repo_walker_main last, so the status passes through unchanged. The only caller is allup's _allup_pull_step, which already handles a non-zero exit. Two existing walk tests pull from a GitHub repo that does not exist; they now expect exit 1. Closes #6
Review follow-up. The report-only walk test exits 1 because its fake origin cannot be pulled, not because of the mis-pointed remote. Assert Failed: 1 so the cause is explicit, and record why the test cannot isolate a mis-pointed remote. README now lists every failure that sets exit 1.
This was referenced Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was broken
my-reposandbeacon-reposprintedFailed: Nand exited 0. A caller that checks the exit status saw success; allup worked around it by parsing the summary text (dotfiles#432).Fix
repo_walker_mainreturns 1 when any repo failed its status check, switch, pull or branch restore. Dirty repos are still skipped with exit 0, a missing directory still exits 0, and report-only lookups (remote checks, dead-branch lookups) do not change the status. The wrappers callrepo_walker_mainlast, so the status passes through.The only caller is allup's
_allup_pull_step, which already handles a non-zero exit. A follow-up dotfiles PR drops its summary parsing.Tests
bats tests/repo-walker.bats: 87/87.Closes #6