Skip to content

Commit

Permalink
Merge pull request #4022 from baude/remotepushgetrt
Browse files Browse the repository at this point in the history
get runtime for podman-remote push earlier
  • Loading branch information
openshift-merge-robot authored Sep 13, 2019
2 parents 9b83882 + 5539a2a commit d74cede
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/podman/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand Down

0 comments on commit d74cede

Please sign in to comment.