From 3642c903c59cdf3d4c8f6228606b58bf4baa3977 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Tue, 28 Oct 2014 20:59:13 -0700 Subject: [PATCH] using %q for quoting ssh command --- plugin/deploy/ssh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/deploy/ssh.go b/plugin/deploy/ssh.go index 0a9653a4..1b54960a 100644 --- a/plugin/deploy/ssh.go +++ b/plugin/deploy/ssh.go @@ -81,7 +81,7 @@ func (s *SSH) Write(f *buildfile.Buildfile) { } if len(s.Cmd) > 0 { - sshCmd := "ssh -o StrictHostKeyChecking=no -p %s %s \"%s\"" + sshCmd := "ssh -o StrictHostKeyChecking=no -p %s %s %q" f.WriteCmd(fmt.Sprintf(sshCmd, host[1], strings.SplitN(host[0], ":", 2)[0], s.Cmd)) } }