From 8c1cd56dcb9f7be634e4121bb91c191f20663e01 Mon Sep 17 00:00:00 2001 From: Arlind-dev Date: Sun, 2 Nov 2025 12:11:07 +0100 Subject: [PATCH] save json in a temporary file --- .gitea/actions/discover-skins/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/actions/discover-skins/action.yml b/.gitea/actions/discover-skins/action.yml index 08c8c80..40ac326 100644 --- a/.gitea/actions/discover-skins/action.yml +++ b/.gitea/actions/discover-skins/action.yml @@ -70,7 +70,11 @@ runs: elif [[ -n "$target_skins" ]]; then echo "→ Target skins specified. Using target_skins input…" - mapfile -t skins < <(echo "$target_skins" | jq -r '.[]') + # Use a temporary file to safely handle special characters + temp_target_file="/tmp/target_skins_$RANDOM.json" + printf '%s' "$target_skins" > "$temp_target_file" + mapfile -t skins < <(jq -r '.[]' "$temp_target_file") + rm -f "$temp_target_file" echo " ✓ Found ${#skins[@]} skin(s) from target_skins input" else