diff --git a/argocd/appSet.go b/argocd/appSet.go index aca5f99..9b6887f 100644 --- a/argocd/appSet.go +++ b/argocd/appSet.go @@ -21,6 +21,11 @@ func RenderApplicationSets(inputDir, outDir string) error { files := make([]string, 0) filepath.WalkDir(inputDir, func(path string, d fs.DirEntry, err error) error { + + if err != nil { + return err + } + if !d.IsDir() { files = append(files, path) } diff --git a/argocd/repoClient.go b/argocd/repoClient.go index 8544936..11caeca 100644 --- a/argocd/repoClient.go +++ b/argocd/repoClient.go @@ -160,6 +160,11 @@ func renderFile(file, repoServerUrl, outputDir string, client apiclient.RepoServ func findArgoApps(rootDir string) ([]string, error) { var argoAppFiles []string err := filepath.Walk(rootDir, func(path string, info fs.FileInfo, err error) error { + + if err != nil { + return err + } + if strings.HasSuffix(info.Name(), ".yml") || strings.HasSuffix(info.Name(), ".yaml") { data, err := os.ReadFile(path) diff --git a/kustomize/kustomizationfile/kustomizationfile.go b/kustomize/kustomizationfile/kustomizationfile.go index a3d60f1..46fa8df 100755 --- a/kustomize/kustomizationfile/kustomizationfile.go +++ b/kustomize/kustomizationfile/kustomizationfile.go @@ -59,6 +59,7 @@ func (k *kustomizationFileContext) GetDirectories(directoryRootPath string) ([]s directories := make([]string, 0) err = filepath.Walk(directoryRootPath, func(path string, info os.FileInfo, err error) error { + if err != nil { return err }