forked from heavy-duty/ceremony
test: isolate preflight fact environments
This commit is contained in:
parent
79e747b163
commit
f19658ea82
1 changed files with 4 additions and 8 deletions
|
|
@ -18,13 +18,9 @@ FOREIGN_SHA=2222222222222222222222222222222222222222
|
|||
# preflight <VER> <MERGE_SHA> <TAG_SHAS> <RELEASED> — 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() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue