diff options
Diffstat (limited to 'internal/configuration/helpers.go')
| -rw-r--r-- | internal/configuration/helpers.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/internal/configuration/helpers.go b/internal/configuration/helpers.go index db4450727..a65f69911 100644 --- a/internal/configuration/helpers.go +++ b/internal/configuration/helpers.go @@ -11,9 +11,7 @@ func getEnvConfigMap(keys []string, prefix, delimiter string, ds map[string]Depr keyMap = make(map[string]string) for _, key := range keys { - if strings.Contains(key, delimiter) { - keyMap[ToEnvironmentKey(key, prefix, delimiter)] = key - } + keyMap[ToEnvironmentKey(key, prefix, delimiter)] = key // Secret envs should be ignored by the env parser. if IsSecretKey(key) { @@ -32,7 +30,13 @@ func getEnvConfigMap(keys []string, prefix, delimiter string, ds map[string]Depr continue } - keyMap[ToEnvironmentKey(deprecation.Key, prefix, delimiter)] = deprecation.Key + d := ToEnvironmentKey(deprecation.Key, prefix, delimiter) + + if _, ok := keyMap[d]; ok { + continue + } + + keyMap[d] = deprecation.Key } return keyMap, ignoredKeys |
