From 97ca73833221b8e13dd880a7c8941f2a6e23a39e Mon Sep 17 00:00:00 2001 From: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com> Date: Tue, 14 Jan 2025 14:29:08 +0100 Subject: [PATCH] [core] Update build.func: Fix bug with advanced tags (#1473) --- misc/build.func | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/misc/build.func b/misc/build.func index 101d919b..0810e501 100644 --- a/misc/build.func +++ b/misc/build.func @@ -629,9 +629,14 @@ advanced_settings() { if ADV_TAGS=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Custom Tags?[If you remove all, there will be no tags!]" 8 58 ${TAGS} --title "Advanced Tags" 3>&1 1>&2 2>&3); then if [ -n "${ADV_TAGS}" ]; then - ADV_TAGS=${ADV_TAGS:-""} - ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') + ADV_TAGS=$(echo "$ADV_TAGS" | tr -d '[:space:]') # Remove whitespace from ADV_TAGS + if [[ "$ADV_TAGS" != *"community-script"* ]]; then TAGS="community-script;${ADV_TAGS}" + else + TAGS="${ADV_TAGS}" # ADV_TAGS already contains "community-script" + fi + else + TAGS="" fi echo -e "${NETWORK}${BOLD}${DGN}Tags: ${BGN}$TAGS${CL}" else