fix(build): skip empty gateway value in network config (#13442)

When var_gateway is set to an empty string, the resulting gw= token
in the comma-separated network string causes pct create to fail with
a 'missing key in comma-separated list property' error.

Closes #13421
This commit is contained in:
CanbiZ (MickLesk)
2026-03-31 23:57:25 +02:00
committed by GitHub
parent b6907269e8
commit 8275531161

View File

@@ -3530,6 +3530,7 @@ build_container() {
# Gateway
if [[ -n "$GATE" ]]; then
case "$GATE" in
,gw=) ;;
,gw=*) NET_STRING+="$GATE" ;;
*) NET_STRING+=",gw=$GATE" ;;
esac