mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Break the dep between fs and pgmconfig.
This commit is contained in:
@@ -81,7 +81,7 @@ func commaOr(q []string) string {
|
||||
func loadKustFile(ldr ifc.Loader) ([]byte, error) {
|
||||
var content []byte
|
||||
match := 0
|
||||
for _, kf := range pgmconfig.KustomizationFileNames {
|
||||
for _, kf := range pgmconfig.KustomizationFileNames() {
|
||||
c, err := ldr.Load(kf)
|
||||
if err == nil {
|
||||
match += 1
|
||||
@@ -92,7 +92,8 @@ func loadKustFile(ldr ifc.Loader) ([]byte, error) {
|
||||
case 0:
|
||||
return nil, fmt.Errorf(
|
||||
"unable to find one of %v in directory '%s'",
|
||||
commaOr(quoted(pgmconfig.KustomizationFileNames)), ldr.Root())
|
||||
commaOr(quoted(pgmconfig.KustomizationFileNames())),
|
||||
ldr.Root())
|
||||
case 1:
|
||||
return content, nil
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user