From ec2a7b4bb93d5be1f081728312a5d62802fda92e Mon Sep 17 00:00:00 2001 From: bchanot Date: Sun, 22 Nov 2026 04:37:34 +0100 Subject: [PATCH] test(doctor): errexit case runs from a heredoc script, no shellcheck suppression --- lib/tests/doctor-vendored.test.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/tests/doctor-vendored.test.sh b/lib/tests/doctor-vendored.test.sh index 492e1ea..cec7c6a 100644 --- a/lib/tests/doctor-vendored.test.sh +++ b/lib/tests/doctor-vendored.test.sh @@ -205,10 +205,12 @@ printf '%s\n' "$out_t" | grep -q 't: skills-external/absent missing' && R3=1 || && R4=1 || R4=0 # doctor.sh runs under `set -euo pipefail`: a missing tree dest and a # missing external copy are reported and doctor goes on to its summary. -# shellcheck disable=SC2016 -out_e="$(bash -c 'set -euo pipefail; source "$1" - check_vendored_trees "$2"; check_vendored_skills "$2" "$2/home" - echo DOCTOR_GOES_ON' _ "$LIB" "$TR" 2>&1)" +cat > "$WORK/errexit.sh" <<'SH' +set -euo pipefail; source "$1" +check_vendored_trees "$2"; check_vendored_skills "$2" "$2/home" +echo DOCTOR_GOES_ON +SH +out_e="$(bash "$WORK/errexit.sh" "$LIB" "$TR" 2>&1)" printf '%s\n' "$out_e" | grep -qx 'DOCTOR_GOES_ON' \ && printf '%s\n' "$out_e" | grep -q 'ghost-ext: skills-external/ghost-ext/SKILL.md missing' \ && R5=1 || R5=0