diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2019-01-29 16:10:51 +0000 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2019-01-29 16:12:56 +0000 |
commit | 097b0eaa9aa03112e86368d20d7e30a8df2d43f3 (patch) | |
tree | 37f654bab2bc659686ae5240ec5607cf443644b3 /cmd/podman | |
parent | ebe929736cdb0925f26b416d56415348f1d16d92 (diff) | |
download | podman-097b0eaa9aa03112e86368d20d7e30a8df2d43f3.tar.gz podman-097b0eaa9aa03112e86368d20d7e30a8df2d43f3.tar.bz2 podman-097b0eaa9aa03112e86368d20d7e30a8df2d43f3.zip |
Make --quiet work in podman create/run
The --queit option is supposed to suppress the pulling messages
when a new image is being pulled down.
This patch fixes this issue.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/create.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go index 065d08df4..c56efa153 100644 --- a/cmd/podman/create.go +++ b/cmd/podman/create.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "io" "io/ioutil" "os" "path/filepath" @@ -128,7 +129,12 @@ func createContainer(c *cli.Context, runtime *libpod.Runtime) (*libpod.Container var data *inspect.ImageData = nil if rootfs == "" && !rootless.SkipStorageSetup() { - newImage, err := runtime.ImageRuntime().New(ctx, c.Args()[0], rtc.SignaturePolicyPath, "", os.Stderr, nil, image.SigningOptions{}, false) + var writer io.Writer + if !c.Bool("quiet") { + writer = os.Stderr + } + + newImage, err := runtime.ImageRuntime().New(ctx, c.Args()[0], rtc.SignaturePolicyPath, "", writer, nil, image.SigningOptions{}, false) if err != nil { return nil, nil, err } |