Skip to content

Commit 2ff910c

Browse files
authored
Merge pull request #997 from fluxcd/backport-996-to-release/v1.0.x
[release/v1.0.x] Fix failure to read dangling symlink.
2 parents bb63e16 + 1789bcc commit 2ff910c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

internal/update/filereader.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ func (r *ScreeningLocalReader) Read() ([]*yaml.RNode, error) {
101101
// assumes the file is encoded as UTF8.
102102
filebytes, err := os.ReadFile(p)
103103
if err != nil {
104+
if (info.Mode() & os.ModeSymlink) != 0 {
105+
return nil
106+
}
107+
104108
return fmt.Errorf("reading YAML file: %w", err)
105109
}
106110

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
testing.yaml

0 commit comments

Comments
 (0)