Check scanner error and remove %w/%v formats

This commit is contained in:
Thomas Roehl
2026-06-30 12:48:14 +02:00
parent 077204d39f
commit d53ec9233d
5 changed files with 40 additions and 12 deletions
+3
View File
@@ -165,6 +165,9 @@ func (m *IpmiCollector) readIpmiTool(output chan lp.CCMessage) error {
y.AddMeta("unit", unit)
output <- y
}
if err := scanner.Err(); err != nil {
return fmt.Errorf("failed to scan output of command: %s", err.Error())
}
// Wait for command end
if err := command.Wait(); err != nil {