Skip to content

Commit 5eb2c02

Browse files
authored
unfollow symlinks (#303)
1 parent 2301a95 commit 5eb2c02

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

internal/helm/chart.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func ParseChart(fsys fs.FS, chartPath string, parent *Chart) (*Chart, error) {
9191
}
9292

9393
if chart.metadata.Type == ChartTypeApplication {
94-
crds, err := fileutils.Find(fsys, filepath.Clean(chartPath+"/crds"), "*.yaml", fileutils.FileTypeRegular|fileutils.FileTypeSymlink, 0)
94+
crds, err := fileutils.Find(fsys, filepath.Clean(chartPath+"/crds"), "*.yaml", fileutils.FileTypeRegular, 0)
9595
if err != nil {
9696
return nil, err
9797
}
@@ -103,7 +103,7 @@ func ParseChart(fsys fs.FS, chartPath string, parent *Chart) (*Chart, error) {
103103
chart.crds = append(chart.crds, raw)
104104
}
105105

106-
manifests, err := fileutils.Find(fsys, filepath.Clean(chartPath+"/templates"), "[^_]*.yaml", fileutils.FileTypeRegular|fileutils.FileTypeSymlink, 0)
106+
manifests, err := fileutils.Find(fsys, filepath.Clean(chartPath+"/templates"), "[^_]*.yaml", fileutils.FileTypeRegular, 0)
107107
if err != nil {
108108
return nil, err
109109
}
@@ -114,7 +114,7 @@ func ParseChart(fsys fs.FS, chartPath string, parent *Chart) (*Chart, error) {
114114
}
115115
}
116116

117-
includes, err := fileutils.Find(fsys, filepath.Clean(chartPath+"/templates"), "_*", fileutils.FileTypeRegular|fileutils.FileTypeSymlink, 0)
117+
includes, err := fileutils.Find(fsys, filepath.Clean(chartPath+"/templates"), "_*", fileutils.FileTypeRegular, 0)
118118
if err != nil {
119119
return nil, err
120120
}
@@ -125,7 +125,7 @@ func ParseChart(fsys fs.FS, chartPath string, parent *Chart) (*Chart, error) {
125125
}
126126

127127
chart.files = Files{}
128-
files, err := fileutils.Find(fsys, filepath.Clean(chartPath), "", fileutils.FileTypeRegular|fileutils.FileTypeSymlink, 0)
128+
files, err := fileutils.Find(fsys, filepath.Clean(chartPath), "", fileutils.FileTypeRegular, 0)
129129
if err != nil {
130130
return nil, err
131131
}

pkg/manifests/kustomize/generator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func NewKustomizeGenerator(fsys fs.FS, kustomizationPath string, _ client.Client
130130
// (which is probably a common usecase); however it has to be clarified how to handle template scopes;
131131
// for example it might be desired that subtrees with a kustomization.yaml file are processed in an own
132132
// template context
133-
files, err := fileutils.Find(fsys, kustomizationPath, "*", fileutils.FileTypeRegular|fileutils.FileTypeSymlink, 0)
133+
files, err := fileutils.Find(fsys, kustomizationPath, "*", fileutils.FileTypeRegular, 0)
134134
if err != nil {
135135
return nil, err
136136
}

0 commit comments

Comments
 (0)