fix(shell): remove runtime early-exit pipe hazards (#1105)
ci/woodpecker/push/publish Pipeline failed
ci/woodpecker/push/ci Pipeline was successful

Co-authored-by: f10-coder <[email protected]>
This commit was merged in pull request #1105.
This commit is contained in:
2026-08-07 09:38:37 +00:00
committed by Mos
parent df4c591ab4
commit 3a1203b2f8
20 changed files with 308 additions and 32 deletions
@@ -84,7 +84,7 @@ cp "$TARGET" "$BAK"
export MOSAIC_TEST_WORK_DIR="$WORK/.work"
# --- where the prose lives: usage() { ... EOF ---------------------------------
PROSE_LO="$(grep -n '^usage() {' "$BAK" | head -1 | cut -d: -f1)"
PROSE_LO="$(grep -n -m1 '^usage() {' "$BAK" | cut -d: -f1)"
PROSE_HI="$(awk -v lo="$PROSE_LO" 'NR > lo && /^EOF$/ { print NR; exit }' "$BAK")"
if [[ -z "$PROSE_LO" || -z "$PROSE_HI" ]]; then
echo "!! cannot locate the usage() heredoc -- the prose guard would be inert; refusing" >&2