From f2dc3d517432a845ad9068d521d9ddbd831e4bbc Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Tue, 3 Dec 2024 11:09:34 +0100 Subject: [PATCH] fix(fetcher): handle all os.Stat() errors --- pkg/fetcher/fetcher.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/fetcher/fetcher.go b/pkg/fetcher/fetcher.go index 735a74e..6ba7e2f 100644 --- a/pkg/fetcher/fetcher.go +++ b/pkg/fetcher/fetcher.go @@ -75,7 +75,7 @@ func getDockerComposeViaHTTP(url string) (*dockerCompose.Config, error) { func readDockerComposeFromFile(name string) (*dockerCompose.Config, error) { fileStat, err := os.Stat(name) switch { - case errors.Is(err, os.ErrNotExist): + case err != nil: return nil, err case fileStat.IsDir(): return nil, fmt.Errorf("%w: %s", ErrorPathIsDir, name)