diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-01-30 12:05:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-30 12:05:19 +0100 |
commit | b71088a01e1e43b87214aaca87c73865fa3b990e (patch) | |
tree | 46b198f659203e9107770d563019a288149606c9 /cmd | |
parent | b01ec95bda1f0398e62be85aeade70f2e6a1ca8d (diff) | |
parent | 097b0eaa9aa03112e86368d20d7e30a8df2d43f3 (diff) | |
download | podman-b71088a01e1e43b87214aaca87c73865fa3b990e.tar.gz podman-b71088a01e1e43b87214aaca87c73865fa3b990e.tar.bz2 podman-b71088a01e1e43b87214aaca87c73865fa3b990e.zip |
Merge pull request #2230 from rhatdan/quiet
Make --quiet work in podman create/run
Diffstat (limited to 'cmd')
-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 } |