diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-05-01 14:08:57 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-05-03 12:00:17 +0000 |
commit | f6d41abfb04550f473b80d89cf8c02e5744a5b0b (patch) | |
tree | 4fac3f8125cc110f8089951ad06c94fd0e7c9576 /libpod | |
parent | 25dc483f00003c046871675ad765350156fb32b2 (diff) | |
download | podman-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')
-rw-r--r-- | libpod/container_commit.go | 2 |
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()) } |