iso: --release must satisfy the mode check it is a third case of

The mode validation still required one of --bootstrap-env / --pairing, so --release died at
'one of --bootstrap-env (direct) or --pairing (generic) is required' before reaching its own
validated branch. Caught by the build's true exit code (rc=1), not by a pipe.
This commit is contained in:
2026-07-31 16:40:17 +02:00
parent 01a8155c5a
commit a4d7dfd336
+5 -3
View File
@@ -162,11 +162,13 @@ else
[[ -n "$PROFILE" ]] || die "--profile is required"
[[ -f "$PROFILE" ]] || die "--profile not found: $PROFILE"
fi
# Mode: exactly one of --bootstrap-env (direct, secret-bearing) or --pairing (generic, secret-free).
if $PAIRING; then
# Mode: exactly one of --bootstrap-env (direct), --pairing (generic) or --release (public image).
if $RELEASE; then
: # validated above; a release image has no bootstrap-env by design
elif $PAIRING; then
[[ -z "$BOOTSTRAP_ENV" ]] || die "--pairing and --bootstrap-env are mutually exclusive"
else
[[ -n "$BOOTSTRAP_ENV" ]] || die "one of --bootstrap-env (direct) or --pairing (generic) is required"
[[ -n "$BOOTSTRAP_ENV" ]] || die "one of --bootstrap-env (direct), --pairing (generic) or --release is required"
[[ -f "$BOOTSTRAP_ENV" ]] || die "--bootstrap-env not found: $BOOTSTRAP_ENV"
fi