Skip to content

Commit

Permalink
Surface error for render (#4758)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkubala authored Sep 9, 2020
1 parent 5b1f940 commit 9cd560b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/skaffold/deploy/helm.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"bufio"
"bytes"
"context"
"errors"
"fmt"
"io"
"io/ioutil"
Expand Down Expand Up @@ -287,9 +288,11 @@ func (h *HelmDeployer) Render(ctx context.Context, out io.Writer, builds []build
args = append(args, "--namespace", r.Namespace)
}

if err := h.exec(ctx, renderedManifests, false, args...); err != nil {
return err
outBuffer := new(bytes.Buffer)
if err := h.exec(ctx, outBuffer, false, args...); err != nil {
return errors.New(outBuffer.String())
}
renderedManifests.Write(outBuffer.Bytes())
}

return outputRenderedManifests(renderedManifests.String(), filepath, out)
Expand Down

0 comments on commit 9cd560b

Please sign in to comment.