mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
be error when no path match
This commit is contained in:
@@ -42,7 +42,7 @@ func GlobPatternsWithLoader(fSys filesys.FileSystem, ldr ifc.Loader, patterns []
|
||||
if len(files) == 0 {
|
||||
loader, err := ldr.New(pattern)
|
||||
if err != nil {
|
||||
log.Printf("%s has no match", pattern)
|
||||
return nil, fmt.Errorf("%s has no match", pattern)
|
||||
} else {
|
||||
result = append(result, pattern)
|
||||
if loader != nil {
|
||||
|
||||
@@ -90,7 +90,7 @@ func TestGlobPatternsWithLoaderRemoteFile(t *testing.T) {
|
||||
|
||||
// test load invalid file
|
||||
resources, err = GlobPatternsWithLoader(fSys, ldr, []string{"http://invalid"})
|
||||
if err != nil {
|
||||
if err == nil {
|
||||
t.Fatalf("unexpected load error: %v", err)
|
||||
}
|
||||
if len(resources) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user