diff --git a/pkgs/servers/monitoring/grafana/plugins/update-grafana-plugin.sh b/pkgs/servers/monitoring/grafana/plugins/update-grafana-plugin.sh index db1463c7333c..34638be8d264 100755 --- a/pkgs/servers/monitoring/grafana/plugins/update-grafana-plugin.sh +++ b/pkgs/servers/monitoring/grafana/plugins/update-grafana-plugin.sh @@ -35,8 +35,8 @@ update() { update-source-version $system "grafanaPlugins.${plugin_name}" "$latest_version" "$hash" } -if echo "$api_response" | jq -e .packages.any > /dev/null; then - # the package contains an "any" package, so there should be only one zipHash. +if echo "$api_response" | jq -e '.packages | select(length == 1) | .any' > /dev/null; then + # the package only contains an "any" package, so there should be only one zipHash. update "any" else update "linux-amd64" "x86_64-linux"