aboutsummaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-14 15:10:09 +0100
committerGitHub <noreply@github.com>2020-11-14 15:10:09 +0100
commit4eb9c28433f8aa1827f844881efb1ae1d15b0860 (patch)
tree4fb3a3ebf33660a05411907374a4e872be0aef7b /pkg/api
parent64a7d492264a071ec31d627fbf4201854567d25a (diff)
parentb5e15f18d01219f666cd30623fb3ec73f338d040 (diff)
downloadpodman-4eb9c28433f8aa1827f844881efb1ae1d15b0860.tar.gz
podman-4eb9c28433f8aa1827f844881efb1ae1d15b0860.tar.bz2
podman-4eb9c28433f8aa1827f844881efb1ae1d15b0860.zip
Merge pull request #8333 from rhatdan/buildah
Podman-remote build is getting ID twice
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/compat/images_build.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/pkg/api/handlers/compat/images_build.go b/pkg/api/handlers/compat/images_build.go
index d5ccf56fe..a4bb72140 100644
--- a/pkg/api/handlers/compat/images_build.go
+++ b/pkg/api/handlers/compat/images_build.go
@@ -272,15 +272,13 @@ loop:
flush()
case <-runCtx.Done():
if !failed {
- if utils.IsLibpodRequest(r) {
- m.Stream = imageID
- } else {
+ if !utils.IsLibpodRequest(r) {
m.Stream = fmt.Sprintf("Successfully built %12.12s\n", imageID)
+ if err := enc.Encode(m); err != nil {
+ logrus.Warnf("Failed to json encode error %q", err.Error())
+ }
+ flush()
}
- if err := enc.Encode(m); err != nil {
- logrus.Warnf("Failed to json encode error %q", err.Error())
- }
- flush()
}
break loop
}