Skip to content

Commit

Permalink
Fixing downloader plugin error handling
Browse files Browse the repository at this point in the history
Signed-off-by: Zoran Krleza <zoran.krleza@true-north.hr>
  • Loading branch information
pixslx committed Apr 5, 2022
1 parent 12f1bc0 commit 06c39c8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/cli/values/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ func (opts *Options) MergeValues(p getter.Providers) (map[string]interface{}, er
for _, value := range opts.FileValues {
reader := func(rs []rune) (interface{}, error) {
bytes, err := readFile(string(rs), p)
if err != nil {
return nil, err
}
return string(bytes), err
}
if err := strvals.ParseIntoFile(value, base, reader); err != nil {
Expand Down Expand Up @@ -117,5 +120,8 @@ func readFile(filePath string, p getter.Providers) ([]byte, error) {
return ioutil.ReadFile(filePath)
}
data, err := g.Get(filePath, getter.WithURL(filePath))
if err != nil {
return nil, err
}
return data.Bytes(), err
}

0 comments on commit 06c39c8

Please sign in to comment.