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>
This commit is contained in:
parent
42a5b0fd93
commit
b5e15f18d0
|
|
@ -272,16 +272,14 @@ loop:
|
||||||
flush()
|
flush()
|
||||||
case <-runCtx.Done():
|
case <-runCtx.Done():
|
||||||
if !failed {
|
if !failed {
|
||||||
if utils.IsLibpodRequest(r) {
|
if !utils.IsLibpodRequest(r) {
|
||||||
m.Stream = imageID
|
|
||||||
} else {
|
|
||||||
m.Stream = fmt.Sprintf("Successfully built %12.12s\n", imageID)
|
m.Stream = fmt.Sprintf("Successfully built %12.12s\n", imageID)
|
||||||
}
|
|
||||||
if err := enc.Encode(m); err != nil {
|
if err := enc.Encode(m); err != nil {
|
||||||
logrus.Warnf("Failed to json encode error %q", err.Error())
|
logrus.Warnf("Failed to json encode error %q", err.Error())
|
||||||
}
|
}
|
||||||
flush()
|
flush()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break loop
|
break loop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
|
||||||
case s.Stream != "":
|
case s.Stream != "":
|
||||||
stdout.Write([]byte(s.Stream))
|
stdout.Write([]byte(s.Stream))
|
||||||
if re.Match([]byte(s.Stream)) {
|
if re.Match([]byte(s.Stream)) {
|
||||||
id = s.Stream
|
id = strings.TrimSuffix(s.Stream, "\n")
|
||||||
}
|
}
|
||||||
case s.Error != "":
|
case s.Error != "":
|
||||||
return nil, errors.New(s.Error)
|
return nil, errors.New(s.Error)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue