aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2019-01-29 16:10:51 +0000
committerMatthew Heon <matthew.heon@pm.me>2019-02-08 15:02:28 -0500
commit9dfefed334cda999b55820368507209f8c6721b0 (patch)
tree566f6851cc1bf0411771752a3fd845d5642f1bc5
parentc5f408b00887c0c3130e06b5dc234a6b0ca99b2d (diff)
downloadpodman-9dfefed334cda999b55820368507209f8c6721b0.tar.gz
podman-9dfefed334cda999b55820368507209f8c6721b0.tar.bz2
podman-9dfefed334cda999b55820368507209f8c6721b0.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>
-rw-r--r--cmd/podman/create.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/podman/create.go b/cmd/podman/create.go
index 93f38d2db..e10009971 100644
--- a/cmd/podman/create.go
+++ b/cmd/podman/create.go
@@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"fmt"
+ "io"
"os"
"path/filepath"
"strconv"
@@ -127,7 +128,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
}