save json in a temporary file

This commit is contained in:
2025-11-02 12:11:07 +01:00
parent 00bb7d45c3
commit 8c1cd56dcb

View File

@@ -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