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 23:00:30 +08:00 committed by GitHub
parent 1395e4682f
commit 9f57952214
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

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")
}