Merge branch 'v3.0' of github.com:traefik/traefik
All checks were successful
/ Building (push) Successful in 10m58s

This commit is contained in:
baalajimaestro 2024-02-19 18:50:08 +05:30
commit 16c8af386b
Signed by: baalajimaestro
GPG key ID: F93C394FE9BBAFD5

View file

@ -24,16 +24,19 @@ func (d DeprecationLoader) Load(args []string, cmd *cli.Command) (bool, error) {
}
// logDeprecation prints deprecation hints and returns whether incompatible deprecated options need to be removed.
func logDeprecation(traefikConfiguration interface{}, args []string) bool {
func logDeprecation(traefikConfiguration interface{}, arguments []string) bool {
// This part doesn't handle properly a flag defined like this:
// --accesslog true
// where `true` could be considered as a new argument.
// This is not really an issue with the deprecation loader since it will filter the unknown nodes later in this
// function.
for i, arg := range args {
// This is not really an issue with the deprecation loader since it will filter the unknown nodes later in this function.
var args []string
for _, arg := range arguments {
if !strings.Contains(arg, "=") {
args[i] = arg + "=true"
args = append(args, arg+"=true")
continue
}
args = append(args, arg)
}
labels, err := flag.Parse(args, nil)