summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-01-12 19:20:29 +0100
committerGitHub <noreply@github.com>2022-01-12 19:20:29 +0100
commitf69fcb24832780a9cc4fd17818967374fcb0710f (patch)
tree9acdf13c0346bde3e855852be42c3e80c379d129 /cmd
parent2cdab5d53923784e72020d70ee9375518f19f9b6 (diff)
parent858b210642573dc3e5e4776d81b639f849531f17 (diff)
downloadpodman-f69fcb24832780a9cc4fd17818967374fcb0710f.tar.gz
podman-f69fcb24832780a9cc4fd17818967374fcb0710f.tar.bz2
podman-f69fcb24832780a9cc4fd17818967374fcb0710f.zip
Merge pull request #12827 from edsantiago/image_scp_quiet
podman image scp: implement --quiet
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/images/scp.go13
1 files changed, 3 insertions, 10 deletions
diff --git a/cmd/podman/images/scp.go b/cmd/podman/images/scp.go
index f02a3c15e..fb20d9417 100644
--- a/cmd/podman/images/scp.go
+++ b/cmd/podman/images/scp.go
@@ -46,6 +46,7 @@ var (
var (
parentFlags []string
+ quiet bool
source entities.ImageScpOptions
dest entities.ImageScpOptions
sshInfo entities.ImageScpConnections
@@ -61,7 +62,7 @@ func init() {
func scpFlags(cmd *cobra.Command) {
flags := cmd.Flags()
- flags.BoolVarP(&source.Quiet, "quiet", "q", false, "Suppress the output")
+ flags.BoolVarP(&quiet, "quiet", "q", false, "Suppress the output")
}
func scp(cmd *cobra.Command, args []string) (finalErr error) {
@@ -139,6 +140,7 @@ func scp(cmd *cobra.Command, args []string) (finalErr error) {
}
}
+ source.Quiet = quiet
source.File = f.Name() // after parsing the arguments, set the file for the save/load
dest.File = source.File
if err = os.Remove(source.File); err != nil { // remove the file and simply use its name so podman creates the file upon save. avoids umask errors
@@ -203,15 +205,6 @@ func scp(cmd *cobra.Command, args []string) (finalErr error) {
}
}
- src, err := json.MarshalIndent(source, "", " ")
- if err != nil {
- return err
- }
- dst, err := json.MarshalIndent(dest, "", " ")
- if err != nil {
- return err
- }
- fmt.Printf("SOURCE: %s\nDEST: %s\n", string(src), string(dst))
return nil
}