mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-09 14:36:38 +00: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