prevent the same path load multiple times

Kubernetes-commit: 973e610787db8a9cee5da098e2f72672be817aa9
This commit is contained in:
wackxu
2017-10-12 10:19:28 +08:00
committed by Kubernetes Publisher
parent fff8c3d73e
commit 1ae3aba19b
3 changed files with 47 additions and 2 deletions

View File

@@ -68,7 +68,9 @@ func (o *PathOptions) GetEnvVarFiles() []string {
return []string{}
}
return filepath.SplitList(envVarValue)
fileList := filepath.SplitList(envVarValue)
// prevent the same path load multiple times
return deduplicate(fileList)
}
func (o *PathOptions) GetLoadingPrecedence() []string {