From 651520389d239f335248a27595d39a815ef95238 Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 7 Mar 2019 15:20:29 -0600 Subject: preparation for remote-client create container to prepare for being able to remotely run a container, we need to perform a refactor to get code out of main because it is not reusable. the shared location is a good starting spot though eventually some will likely end up in pkg/spec/ at some point. Signed-off-by: baude --- cmd/podman/exec.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cmd/podman/exec.go') diff --git a/cmd/podman/exec.go b/cmd/podman/exec.go index e4cea1f5e..aa81edf56 100644 --- a/cmd/podman/exec.go +++ b/cmd/podman/exec.go @@ -2,16 +2,17 @@ package main import ( "fmt" - "github.com/containers/libpod/cmd/podman/cliconfig" - "github.com/spf13/cobra" "io/ioutil" "os" "strconv" + "github.com/containers/libpod/cmd/podman/cliconfig" "github.com/containers/libpod/cmd/podman/libpodruntime" + "github.com/containers/libpod/cmd/podman/shared/parse" "github.com/containers/libpod/libpod" "github.com/containers/libpod/pkg/rootless" "github.com/pkg/errors" + "github.com/spf13/cobra" ) var ( @@ -130,7 +131,7 @@ func execCmd(c *cliconfig.ExecValues) error { // ENVIRONMENT VARIABLES env := map[string]string{} - if err := readKVStrings(env, []string{}, c.Env); err != nil { + if err := parse.ReadKVStrings(env, []string{}, c.Env); err != nil { return errors.Wrapf(err, "unable to process environment variables") } envs := []string{} -- cgit v1.2.3-54-g00ecf