Merge pull request #259 from thaJeztah/19.03_backport_fix_build_panic

[19.03 backport] build: fix panic when exporting to tar
This commit is contained in:
Andrew Hsu 2019-06-04 09:16:37 -07:00 committed by GitHub
commit 21c33eb7e3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,7 +91,9 @@ func (b *Backend) Build(ctx context.Context, config backend.BuildConfig) (string
stdout := config.ProgressWriter.StdoutFormatter
fmt.Fprintf(stdout, "Successfully built %s\n", stringid.TruncateID(imageID))
}
err = tagger.TagImages(image.ID(imageID))
if imageID != "" {
err = tagger.TagImages(image.ID(imageID))
}
return imageID, err
}