diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-09-13 18:55:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-13 18:55:47 +0200 |
commit | d74cedefbd4bdde264bc9c63864c1f7816612b9f (patch) | |
tree | 1ac1691758b2eea543fed3e35de7d84822849a02 | |
parent | 9b83882114d5b510315495616b4bf599aca9b7c1 (diff) | |
parent | 5539a2a2283048f49c529b34912b9d67e9830acb (diff) | |
download | podman-d74cedefbd4bdde264bc9c63864c1f7816612b9f.tar.gz podman-d74cedefbd4bdde264bc9c63864c1f7816612b9f.tar.bz2 podman-d74cedefbd4bdde264bc9c63864c1f7816612b9f.zip |
Merge pull request #4022 from baude/remotepushgetrt
get runtime for podman-remote push earlier
-rw-r--r-- | cmd/podman/push.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/podman/push.go b/cmd/podman/push.go index 13ebe8a1f..52fbc652e 100644 --- a/cmd/podman/push.go +++ b/cmd/podman/push.go @@ -86,6 +86,12 @@ func pushCmd(c *cliconfig.PushValues) error { destName = args[1] } + runtime, err := adapter.GetRuntime(getContext(), &c.PodmanCommand) + if err != nil { + return errors.Wrapf(err, "could not create runtime") + } + defer runtime.DeferredShutdown(false) + // --compress and --format can only be used for the "dir" transport splitArg := strings.SplitN(destName, ":", 2) if c.Flag("compress").Changed || c.Flag("format").Changed { @@ -106,12 +112,6 @@ func pushCmd(c *cliconfig.PushValues) error { registryCreds = creds } - runtime, err := adapter.GetRuntime(getContext(), &c.PodmanCommand) - if err != nil { - return errors.Wrapf(err, "could not create runtime") - } - defer runtime.DeferredShutdown(false) - var writer io.Writer if !c.Quiet { writer = os.Stderr |