summaryrefslogtreecommitdiff
path: root/libpod/container_commit.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-05-01 14:08:57 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-03 12:00:17 +0000
commitf6d41abfb04550f473b80d89cf8c02e5744a5b0b (patch)
tree4fac3f8125cc110f8089951ad06c94fd0e7c9576 /libpod/container_commit.go
parent25dc483f00003c046871675ad765350156fb32b2 (diff)
downloadpodman-f6d41abfb04550f473b80d89cf8c02e5744a5b0b.tar.gz
podman-f6d41abfb04550f473b80d89cf8c02e5744a5b0b.tar.bz2
podman-f6d41abfb04550f473b80d89cf8c02e5744a5b0b.zip
Print the Buildah comment from commit to given writer
Much better than unconditionally dumping to stdout Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #706 Approved by: rhatdan
Diffstat (limited to 'libpod/container_commit.go')
-rw-r--r--libpod/container_commit.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/container_commit.go b/libpod/container_commit.go
index bc38c200e..354aff8b9 100644
--- a/libpod/container_commit.go
+++ b/libpod/container_commit.go
@@ -2,6 +2,7 @@ package libpod
import (
"context"
+ "fmt"
"strings"
is "github.com/containers/image/storage"
@@ -142,5 +143,6 @@ func (c *Container) Commit(ctx context.Context, destImage string, options Contai
if err = importBuilder.Commit(ctx, imageRef, commitOptions); err != nil {
return nil, err
}
+ fmt.Fprintf(commitOptions.ReportWriter, importBuilder.Comment())
return c.runtime.imageRuntime.NewFromLocal(imageRef.DockerReference().String())
}