aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-08-24 06:00:03 -0400
committerGitHub <noreply@github.com>2022-08-24 06:00:03 -0400
commitd4e54fa9992d369596bcaf969bea8dbbcb7335ab (patch)
tree8f1d53081039b64330060d3e3e16717239206e2c /cmd/podman
parentbbd8b64a4247c591738f7ebbac683f48aa7351a5 (diff)
parent3bf52aa338b33de719e087e15402081568453284 (diff)
downloadpodman-d4e54fa9992d369596bcaf969bea8dbbcb7335ab.tar.gz
podman-d4e54fa9992d369596bcaf969bea8dbbcb7335ab.tar.bz2
podman-d4e54fa9992d369596bcaf969bea8dbbcb7335ab.zip
Merge pull request #15351 from marshall-lee/images-pull-simple
Simplify ImagesPull for when Quiet flag is on
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/images/pull.go5
-rw-r--r--cmd/podman/images/push.go4
-rw-r--r--cmd/podman/manifest/push.go5
3 files changed, 14 insertions, 0 deletions
diff --git a/cmd/podman/images/pull.go b/cmd/podman/images/pull.go
index 8211ceba5..fe9d1e9b6 100644
--- a/cmd/podman/images/pull.go
+++ b/cmd/podman/images/pull.go
@@ -155,6 +155,11 @@ func imagePull(cmd *cobra.Command, args []string) error {
pullOptions.Username = creds.Username
pullOptions.Password = creds.Password
}
+
+ if !pullOptions.Quiet {
+ pullOptions.Writer = os.Stderr
+ }
+
// Let's do all the remaining Yoga in the API to prevent us from
// scattering logic across (too) many parts of the code.
var errs utils.OutputErrors
diff --git a/cmd/podman/images/push.go b/cmd/podman/images/push.go
index 1734900de..fa60860db 100644
--- a/cmd/podman/images/push.go
+++ b/cmd/podman/images/push.go
@@ -164,6 +164,10 @@ func imagePush(cmd *cobra.Command, args []string) error {
pushOptions.Password = creds.Password
}
+ if !pushOptions.Quiet {
+ pushOptions.Writer = os.Stderr
+ }
+
if err := common.PrepareSigningPassphrase(&pushOptions.ImagePushOptions, pushOptions.SignPassphraseFileCLI); err != nil {
return err
}
diff --git a/cmd/podman/manifest/push.go b/cmd/podman/manifest/push.go
index fd67769b8..c8893ff2e 100644
--- a/cmd/podman/manifest/push.go
+++ b/cmd/podman/manifest/push.go
@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"io/ioutil"
+ "os"
"github.com/containers/common/pkg/auth"
"github.com/containers/common/pkg/completion"
@@ -122,6 +123,10 @@ func push(cmd *cobra.Command, args []string) error {
manifestPushOpts.Password = creds.Password
}
+ if !manifestPushOpts.Quiet {
+ manifestPushOpts.Writer = os.Stderr
+ }
+
if err := common.PrepareSigningPassphrase(&manifestPushOpts.ImagePushOptions, manifestPushOpts.SignPassphraseFileCLI); err != nil {
return err
}