mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-09-11 08:29:05 +02:00
If an WMI query were to return an empty result set, trying to access the first element in the result set would result in a `panic: runtime error: index out of range` error. add logic to explicitly check if the result set size is 0 and return an error rather. Fixes https://github.com/martinlindhe/wmi_exporter/issues/240