From 7eaf1b8c5dbeab5800c6425c0dcb5d22508267af Mon Sep 17 00:00:00 2001 From: Pavel Snagovsky Date: Fri, 18 Jun 2021 14:08:46 -0700 Subject: [PATCH] Bug identifying the path, a local variable was used instead of global one --- liquidctl-exporter.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/liquidctl-exporter.go b/liquidctl-exporter.go index 55f719e..8ee3ba7 100644 --- a/liquidctl-exporter.go +++ b/liquidctl-exporter.go @@ -52,9 +52,11 @@ var devices = map[string]map[string]prometheus.Gauge{} var path string func init() { - path, ok := os.LookupEnv(envPath) + p, ok := os.LookupEnv(envPath) if !ok { path = defaultLiquidCMD + } else { + path = p } log.Infof("liquidctl configured path, %s", path)