Improve error msg returned when no kustomization file is found

Signed-off-by: Alexander Brand <alexbrand09@gmail.com>
This commit is contained in:
Alexander Brand
2019-02-06 16:10:49 -05:00
parent d720e9ef49
commit 242b9209d8
2 changed files with 4 additions and 3 deletions

View File

@@ -88,11 +88,12 @@ func loadKustFile(ldr ifc.Loader) ([]byte, error) {
}
switch match {
case 0:
return nil, fmt.Errorf("no kustomization.yaml file under %s", ldr.Root())
return nil, fmt.Errorf("No kustomization file found in %s. Kustomize supports the following kustomization files: %s",
ldr.Root(), strings.Join(constants.KustomizationFileNames, ", "))
case 1:
return content, nil
default:
return nil, fmt.Errorf("Found multiple kustomization file under: %s\n", ldr.Root())
return nil, fmt.Errorf("Found multiple kustomization files under: %s\n", ldr.Root())
}
}