Skip to content

A self-hosted dashboard that puts all your feeds in one place

Print warnings when failing to get sensors

Svilen Markov920bcb06dca0
diff --git a/internal/glance/cli.go b/internal/glance/cli.go
index a071e24..9cbb607 100644
--- a/internal/glance/cli.go
+++ b/internal/glance/cli.go
@@ -86,6 +86,12 @@ func cliSensorsPrint() int {
tempSensors, err := sensors.SensorsTemperatures()
if err != nil {
fmt.Printf("Failed to retrieve list of sensors: %v\n", err)
+ if warns, ok := err.(*sensors.Warnings); ok {
+ for _, w := range warns.List {
+ fmt.Printf(" - %v\n", w)
+ }
+ }
+
return 1
}