fix: Preserve product key structure in answer files (#2066)

This commit is contained in:
Kroese
2026-08-06 02:37:58 +02:00
committed by GitHub
parent 4b39ed53ae
commit 0d3206c973
+8 -1
View File
@@ -1184,8 +1184,15 @@ removeEmbeddedProductKeys() {
continue continue
fi fi
if [[ "$child_key" =~ ^[A-Za-z0-9]{5}(-[A-Za-z0-9]{5}){4}$ ]]; then
[ -z "$delete_xpath" ] || delete_xpath+=" | " [ -z "$delete_xpath" ] || delete_xpath+=" | "
delete_xpath+="($product_keys)[$position]" delete_xpath+="($product_keys)[$position]/u:Key[normalize-space(.)][1]"
fi
if [[ "$direct_key" =~ ^[A-Za-z0-9]{5}(-[A-Za-z0-9]{5}){4}$ ]]; then
[ -z "$delete_xpath" ] || delete_xpath+=" | "
delete_xpath+="($product_keys)[$position]/text()[normalize-space()][1]"
fi
done <<< "$records" done <<< "$records"
[ -n "$delete_xpath" ] || return 0 [ -n "$delete_xpath" ] || return 0