mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
Replace os.Stat call with FileSystem.Exists
This commit is contained in:
@@ -328,11 +328,8 @@ func (r *LocalPackageReader) shouldSkipDir(path string, matcher *ignoreFilesMatc
|
||||
return nil
|
||||
}
|
||||
// check if this is a subpackage
|
||||
_, err := os.Stat(filepath.Join(path, r.PackageFileName))
|
||||
if os.IsNotExist(err) {
|
||||
if !r.FileSystem.Exists(filepath.Join(path, r.PackageFileName)) {
|
||||
return nil
|
||||
} else if err != nil {
|
||||
return errors.Wrap(err)
|
||||
}
|
||||
if !r.IncludeSubpackages {
|
||||
return filepath.SkipDir
|
||||
|
||||
Reference in New Issue
Block a user