Apply the case of the CLI flags for the configuration
This commit is contained in:
parent
cd164de776
commit
91e63dea47
5 changed files with 174 additions and 43 deletions
|
@ -30,8 +30,15 @@ func (f *FileLoader) Load(args []string, cmd *Command) (bool, error) {
|
|||
}
|
||||
|
||||
configFileFlag := "traefik.configfile"
|
||||
if _, ok := ref["traefik.configFile"]; ok {
|
||||
configFileFlag = "traefik.configFile"
|
||||
}
|
||||
|
||||
if f.ConfigFileFlag != "" {
|
||||
configFileFlag = "traefik." + strings.ToLower(f.ConfigFileFlag)
|
||||
configFileFlag = "traefik." + f.ConfigFileFlag
|
||||
if _, ok := ref[strings.ToLower(configFileFlag)]; ok {
|
||||
configFileFlag = "traefik." + strings.ToLower(f.ConfigFileFlag)
|
||||
}
|
||||
}
|
||||
|
||||
configFile, err := loadConfigFiles(ref[configFileFlag], cmd.Configuration)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue