fix: use refrence should after err handles (#2128)

* fix: use refrence should after err handles

* Update pkg/executor/build.go

Co-authored-by: Jason Hall <jason@chainguard.dev>
This commit is contained in:
Hingbong Lo
2022-06-09 11:00:30 -04:00
committed by GitHub
co-authored by Jason Hall
parent 1395e4682f
commit 9f57952214
+1 -2
View File
@@ -634,11 +634,10 @@ func DoBuild(opts *config.KanikoOptions) (v1.Image, error) {
logrus.Infof("Building stage '%v' [idx: '%v', base-idx: '%v']",
stage.BaseName, stage.Index, stage.BaseImageIndex)
args = sb.args
if err != nil {
return nil, err
}
args = sb.args
if err := sb.build(); err != nil {
return nil, errors.Wrap(err, "error building stage")
}