mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-04-12 00:05:54 +02:00
Reuse looked up path
This commit is contained in:
parent
5b951fcfe8
commit
bdb16090d7
@ -73,10 +73,11 @@ func (m *GpfsCollector) Init(config json.RawMessage) error {
|
||||
}
|
||||
|
||||
// Check if mmpmon is in executable search path
|
||||
_, err = exec.LookPath(m.config.Mmpmon)
|
||||
p, err := exec.LookPath(m.config.Mmpmon)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to find mmpmon binary '%s': %v", m.config.Mmpmon, err)
|
||||
}
|
||||
m.config.Mmpmon = p
|
||||
|
||||
m.init = true
|
||||
return nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user