mirror of
https://github.com/containers/podman.git
synced 2025-06-20 17:13:43 +08:00
Fix podman save when redirecting output
podman save would write the progress bar to the image tar file when the output was redirected with >. Fixed the writer to write to stderr for all commands using writer Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #362 Approved by: mheon
This commit is contained in:
@ -392,7 +392,7 @@ func imageData(c *cli.Context, runtime *libpod.Runtime, image string) (string, s
|
|||||||
// Pull the image
|
// Pull the image
|
||||||
var writer io.Writer
|
var writer io.Writer
|
||||||
if !c.Bool("quiet") {
|
if !c.Bool("quiet") {
|
||||||
writer = os.Stdout
|
writer = os.Stderr
|
||||||
}
|
}
|
||||||
createImage.Pull(writer)
|
createImage.Pull(writer)
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ func loadCmd(c *cli.Context) error {
|
|||||||
|
|
||||||
var writer io.Writer
|
var writer io.Writer
|
||||||
if !c.Bool("quiet") {
|
if !c.Bool("quiet") {
|
||||||
writer = os.Stdout
|
writer = os.Stderr
|
||||||
}
|
}
|
||||||
|
|
||||||
options := libpod.CopyOptions{
|
options := libpod.CopyOptions{
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/containers/image/types"
|
"github.com/containers/image/types"
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
"github.com/projectatomic/libpod/libpod"
|
"github.com/projectatomic/libpod/libpod"
|
||||||
@ -90,7 +91,7 @@ func pullCmd(c *cli.Context) error {
|
|||||||
|
|
||||||
var writer io.Writer
|
var writer io.Writer
|
||||||
if !c.Bool("quiet") {
|
if !c.Bool("quiet") {
|
||||||
writer = os.Stdout
|
writer = os.Stderr
|
||||||
}
|
}
|
||||||
|
|
||||||
options := libpod.CopyOptions{
|
options := libpod.CopyOptions{
|
||||||
|
@ -118,7 +118,7 @@ func pushCmd(c *cli.Context) error {
|
|||||||
|
|
||||||
var writer io.Writer
|
var writer io.Writer
|
||||||
if !c.Bool("quiet") {
|
if !c.Bool("quiet") {
|
||||||
writer = os.Stdout
|
writer = os.Stderr
|
||||||
}
|
}
|
||||||
|
|
||||||
var manifestType string
|
var manifestType string
|
||||||
|
@ -75,7 +75,7 @@ func saveCmd(c *cli.Context) error {
|
|||||||
|
|
||||||
var writer io.Writer
|
var writer io.Writer
|
||||||
if !c.Bool("quiet") {
|
if !c.Bool("quiet") {
|
||||||
writer = os.Stdout
|
writer = os.Stderr
|
||||||
}
|
}
|
||||||
|
|
||||||
output := c.String("output")
|
output := c.String("output")
|
||||||
|
Reference in New Issue
Block a user