File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 9494
9595 # Handle arrays of URLs (e.g., screenshots)
9696 # Check if the field is an array using yq length check
97- is_array=$(echo "$metadata" | yq -r ".${field} | length")
97+ local field_type
98+ field_type=$(echo "$metadata" | yq -r ".${field} | type")
99+ echo "Field type: $field_type"
98100
99- if [[ "$is_array " =~ ^[0-9]+$ && "$is_array" -gt 0 ]]; then
101+ if [[ "$field_type " == "array" ]]; then
100102 # Iterate properly over array elements
101103 for url in $(echo "$metadata" | yq -r ".$field[]" || true); do
102104 if [[ -z "$url" ]]; then # Skip empty values inside arrays
Original file line number Diff line number Diff line change @@ -10,9 +10,7 @@ detailed_description: "Plugin's detailed description"
1010
1111# Media & Assets
1212plugin_logo_url : " "
13- screenshots :
14- - " "
15- - " "
13+ screenshots : [ "", ""]
1614demo_video_url : " "
1715documentation_url : " "
1816changelog_url : " "
You can’t perform that action at this time.
0 commit comments