Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1815 from weaveworks/issues/1803-report-problem-f…
Browse files Browse the repository at this point in the history
…iles

Include source file in errors from kubeyaml
  • Loading branch information
squaremo authored Mar 13, 2019
2 parents e13cb23 + ed3d48f commit 14ec34c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions release/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"os"
"path/filepath"

"github.com/pkg/errors"

"github.com/weaveworks/flux"
"github.com/weaveworks/flux/cluster"
"github.com/weaveworks/flux/git"
Expand Down Expand Up @@ -48,11 +50,11 @@ func (rc *ReleaseContext) WriteUpdates(updates []*update.ControllerUpdate) error
for _, container := range update.Updates {
manifestBytes, err = rc.manifests.UpdateImage(manifestBytes, update.ResourceID, container.Container, container.Target)
if err != nil {
return err
return errors.Wrapf(err, "updating resource %s in %s", update.ResourceID.String(), update.Resource.Source())
}
}
if err = ioutil.WriteFile(update.ManifestPath, manifestBytes, os.FileMode(0600)); err != nil {
return err
return errors.Wrapf(err, "writing updated file %s", update.Resource.Source())
}
}
return nil
Expand Down

0 comments on commit 14ec34c

Please sign in to comment.