mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-25 14:16:36 +00:00
Merge pull request #1100 from knabben/dedup-listen-address
Cleaning up listen addresses flags before parsing config file
This commit is contained in:
@@ -303,6 +303,12 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("%v\n", err)
|
log.Fatalf("%v\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOTE: This is temporary fix for issue #1092, calling kingpin.Parse
|
||||||
|
// twice makes slices flags duplicate its value, this clean up
|
||||||
|
// the first parse before the second call.
|
||||||
|
*webConfig.WebListenAddresses = (*webConfig.WebListenAddresses)[1:]
|
||||||
|
|
||||||
// Parse flags once more to include those discovered in configuration file(s).
|
// Parse flags once more to include those discovered in configuration file(s).
|
||||||
kingpin.Parse()
|
kingpin.Parse()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user