From f19658ea82445ccb58b10dbb78ed079d8e939e73 Mon Sep 17 00:00:00 2001 From: codex-bot-andresmgsl Date: Mon, 31 Aug 2026 11:24:53 +0000 Subject: [PATCH] test: isolate preflight fact environments --- test/preflight.test.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/preflight.test.sh b/test/preflight.test.sh index dc07abe..ac88451 100755 --- a/test/preflight.test.sh +++ b/test/preflight.test.sh @@ -18,13 +18,9 @@ FOREIGN_SHA=2222222222222222222222222222222222222222 # preflight — run the pure decision # with exactly the four gathered facts in its environment. preflight() { - ( - VER="$1" MERGE_SHA="$2" TAG_SHAS="$3" RELEASED="$4" - export VER MERGE_SHA TAG_SHAS RELEASED - # shellcheck source=lib/preflight.sh - . "$PREFLIGHT" - release_preflight - ) + # shellcheck disable=SC2016 # PREFLIGHT expands inside the isolated child + env VER="$1" MERGE_SHA="$2" TAG_SHAS="$3" RELEASED="$4" \ + PREFLIGHT="$PREFLIGHT" bash -c '. "$PREFLIGHT"; release_preflight' } preflight_stdout() { @@ -32,7 +28,7 @@ preflight_stdout() { } preflight_stderr() { - preflight "$@" 2>&1 >/dev/null + { preflight "$@" >/dev/null; } 2>&1 } refuses_without_output() {