Skip to content

Commit 84682a1

Browse files
authored
Merge pull request #5101 from justinsb/fixlint_2
Fix unused error value
2 parents a2e9682 + 317fcad commit 84682a1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

api/internal/builtins/HelmChartInflationGenerator.go

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/builtin/helmchartinflationgenerator/HelmChartInflationGenerator.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,18 @@ func (p *plugin) Generate() (rm resmap.ResMap, err error) {
268268
// helm may produce messages to stdout before it
269269
r := &kio.ByteReader{Reader: bytes.NewBufferString(string(stdout)), OmitReaderAnnotations: true}
270270
nodes, err := r.Read()
271+
if err != nil {
272+
return nil, fmt.Errorf("error reading helm output: %w", err)
273+
}
271274

272275
if len(nodes) != 0 {
273276
rm, err = p.h.ResmapFactory().NewResMapFromRNodeSlice(nodes)
274277
if err != nil {
275-
return nil, fmt.Errorf("could not parse rnode slice into resource map: %w\n", err)
278+
return nil, fmt.Errorf("could not parse rnode slice into resource map: %w", err)
276279
}
277280
return rm, nil
278281
}
279-
return nil, fmt.Errorf("could not parse bytes into resource map: %w\n", resMapErr)
282+
return nil, fmt.Errorf("could not parse bytes into resource map: %w", resMapErr)
280283
}
281284

282285
func (p *plugin) pullCommand() []string {

0 commit comments

Comments
 (0)