diff --git a/pkg/executor/push.go b/pkg/executor/push.go index 9b5f3bfe3f..7cf18871e7 100644 --- a/pkg/executor/push.go +++ b/pkg/executor/push.go @@ -236,7 +236,10 @@ func DoPush(image v1.Image, opts *config.KanikoOptions) error { for _, destRef := range destRefs { tagToImage[destRef] = image } - return tarball.MultiWriteToFile(opts.TarPath, tagToImage) + err := tarball.MultiWriteToFile(opts.TarPath, tagToImage) + if err != nil { + return errors.Wrap(err, "writing tarball to file failed") + } } if opts.NoPush {