Skip to content

Commit

Permalink
Merge pull request #8333 from rhatdan/buildah
Browse files Browse the repository at this point in the history
Podman-remote build is getting ID twice
  • Loading branch information
openshift-merge-robot authored Nov 14, 2020
2 parents 64a7d49 + b5e15f1 commit 4eb9c28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions pkg/api/handlers/compat/images_build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/bindings/images/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ func Build(ctx context.Context, containerFiles []string, options entities.BuildO
case s.Stream != "":
stdout.Write([]byte(s.Stream))
if re.Match([]byte(s.Stream)) {
id = s.Stream
id = strings.TrimSuffix(s.Stream, "\n")
}
case s.Error != "":
return nil, errors.New(s.Error)
Expand Down

0 comments on commit 4eb9c28

Please sign in to comment.