We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 148f9b6 commit 6744c9fCopy full SHA for 6744c9f
.github/workflows/validate-new-plugin-metadata.yml
@@ -94,11 +94,12 @@ jobs:
94
95
# Handle arrays of URLs (e.g., screenshots)
96
# Check if the field is an array using yq length check
97
- is_array=$(echo "$metadata" | yq -r ".${field} | length")
98
-
99
- if [[ "$is_array" =~ ^[0-9]+$ && "$is_array" -gt 0 ]]; then
+ local field_type
+ field_type=$(echo "$metadata" | yq -r ".${field} | type")
+
100
+ if [[ "$field_type" == "!!seq" ]]; then
101
# Iterate properly over array elements
- for url in $(echo "$metadata" | yq -r ".$field[]" || true); do
102
+ for url in $(echo "$metadata" | yq ".$field" | .[]'); do
103
if [[ -z "$url" ]]; then # Skip empty values inside arrays
104
continue
105
fi
0 commit comments