diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-11-13 04:36:23 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-11-14 06:25:29 -0500 |
commit | b5e15f18d01219f666cd30623fb3ec73f338d040 (patch) | |
tree | 8083e0dff63390dd86054d2e8184fe5a9410d3ab /pkg/api | |
parent | 42a5b0fd93c8a19433be814273e9ac80e53d7bbe (diff) | |
download | podman-b5e15f18d01219f666cd30623fb3ec73f338d040.tar.gz podman-b5e15f18d01219f666cd30623fb3ec73f338d040.tar.bz2 podman-b5e15f18d01219f666cd30623fb3ec73f338d040.zip |
Podman-remote build is getting ID twice
This PR eliminates the second sending of the image id to the
podman-remote client.
Fixes: https://github.com/containers/podman/issues/8332
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/api')
-rw-r--r-- | pkg/api/handlers/compat/images_build.go | 12 |
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 } |