From cf4a9d9dc2226f0a36fcd6d5e250860fae6e96bd Mon Sep 17 00:00:00 2001 From: John Engelman Date: Mon, 9 Nov 2015 20:44:38 -0600 Subject: [PATCH] Don't need to quote since we aren't in a shell. Also make sure to split on spaces in args. --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 20d93a9..1804f38 100644 --- a/main.go +++ b/main.go @@ -61,7 +61,7 @@ func remoteConfigCommand(config remote) *exec.Cmd { fmt.Sprintf("-backend=%s", config.Backend), } for k, v := range config.Config { - args = append(args, fmt.Sprintf("-backend-config=\"%s=%s\"", k, v)) + args = append(args, fmt.Sprintf("-backend-config=%s=%s", k, v)) } return exec.Command( "terraform", @@ -75,7 +75,8 @@ func planCommand(variables map[string]string) *exec.Cmd { "-out=plan.tfout", } for k, v := range variables { - args = append(args, fmt.Sprintf("-var \"%s=%s\"", k, v)) + args = append(args, "-var") + args = append(args, fmt.Sprintf("%s=%s", k, v)) } return exec.Command( "terraform",