mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-21 15:33:17 +01:00
fix: Log GATUS_CONFIG_FILE deprecation message only if it's non-empty
This commit is contained in:
parent
78dccc90e1
commit
e61a42220c
5
main.go
5
main.go
@ -56,8 +56,9 @@ func loadConfiguration() (*config.Config, error) {
|
||||
configPath := os.Getenv("GATUS_CONFIG_PATH")
|
||||
// Backwards compatibility
|
||||
if len(configPath) == 0 {
|
||||
configPath = os.Getenv("GATUS_CONFIG_FILE")
|
||||
log.Println("WARNING: GATUS_CONFIG_FILE is deprecated. Please use GATUS_CONFIG_PATH instead.")
|
||||
if configPath = os.Getenv("GATUS_CONFIG_FILE"); len(configPath) > 0 {
|
||||
log.Println("WARNING: GATUS_CONFIG_FILE is deprecated. Please use GATUS_CONFIG_PATH instead.")
|
||||
}
|
||||
}
|
||||
return config.LoadConfiguration(configPath)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user