From 379867370a84fb299acb612b67352b5ede18f850 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 4 Aug 2026 14:03:35 +0200 Subject: [PATCH] fix: Fail when domain membership cannot be applied (#2044) --- src/answer.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/answer.sh b/src/answer.sh index d3149313..7b82fdf4 100644 --- a/src/answer.sh +++ b/src/answer.sh @@ -1645,12 +1645,9 @@ updateMembership() { if [ -n "$domain" ]; then - # Domain customization is optional: if the template cannot be transformed, - # retain its local-account path and allow installation to continue. if ! updateDomain "$asset" "$domain" "$account" "$auth" "$PASSWORD" "${DOMAIN_OU:-}"; then - - warn "failed to add domain configuration to answer file!" - return 0 + error "Failed to add domain configuration to answer file!" + return 1 fi removeLocalAccount "$asset" || return 1 @@ -1660,7 +1657,8 @@ updateMembership() { [ -n "$workgroup" ] || return 0 if ! updateWorkgroup "$asset" "$workgroup"; then - warn "failed to add workgroup configuration to answer file!" + error "Failed to add workgroup configuration to answer file!" + return 1 fi return 0