From ceb425e0d7ac33b91f35ddbef7fe1064d539f874 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 26 Aug 2026 13:23:13 -0400 Subject: [PATCH] fix(sweep): stop repo_settings.yml aborting silently under bash -e MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GitHub runs a `run:` block as `bash -e {0}`. The block set `-uo pipefail` and never disabled `-e`, so the per-repo read before=$(gh api "repos/$slug" --jq '.delete_branch_on_merge' 2>/dev/null) aborted the entire script the moment one repo was unreadable — and silently, because that stderr is discarded. The `case "$before" in ... *)` unreadable branch, and with it the in-org/out-of-org failure-policy split #292 added, could never execute. The first real dispatch failed in 20s with no output at all. A second instance was latent: `[ "$hard" -eq 1 ] && failed=1` ends `visit()` in two branches, and with hard=0 that compound returns 1, so the function returned 1 and `-e` aborted on the first out-of-org repo. Both are now `if` blocks. `-e` is disabled explicitly rather than with `|| true` on the read, because the hazard applies to every guarded command in the block. The tests are the real fix. #292 was control-tested across seven scenarios and still shipped this, because the harness ran `bash