diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-03 22:41:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-03 22:41:18 +0200 |
commit | 35f586783388cdff6b4f15e7aff4df1ee72d9b67 (patch) | |
tree | 3d44eed09f7dca13f9c152468b55ee2968e5f6b8 /pkg/bindings | |
parent | 64cade0f71a8189403d208cbc7dc8716008229be (diff) | |
parent | 837aad724ff1f7f4cc3b125b8b3419af29cd4982 (diff) | |
download | podman-35f586783388cdff6b4f15e7aff4df1ee72d9b67.tar.gz podman-35f586783388cdff6b4f15e7aff4df1ee72d9b67.tar.bz2 podman-35f586783388cdff6b4f15e7aff4df1ee72d9b67.zip |
Merge pull request #5672 from baude/v2save
podmanv2 save image
Diffstat (limited to 'pkg/bindings')
-rw-r--r-- | pkg/bindings/images/images.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/bindings/images/images.go b/pkg/bindings/images/images.go index dcb568d6b..1b3df609b 100644 --- a/pkg/bindings/images/images.go +++ b/pkg/bindings/images/images.go @@ -146,11 +146,12 @@ func Export(ctx context.Context, nameOrID string, w io.Writer, format *string, c if err != nil { return err } - if err := response.Process(nil); err != nil { + + if response.StatusCode/100 == 2 || response.StatusCode/100 == 3 { + _, err = io.Copy(w, response.Body) return err } - _, err = io.Copy(w, response.Body) - return err + return nil } // Prune removes unused images from local storage. The optional filters can be used to further |