From e482ef2790349f500454c3f5c21b37cd70e0d0f2 Mon Sep 17 00:00:00 2001 From: Ben Schumacher Date: Thu, 25 Aug 2016 13:02:23 -0600 Subject: [PATCH] Correct escaping of commands in YAML --- yaml/transform/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yaml/transform/command.go b/yaml/transform/command.go index cf4892f01..a90e8c2a1 100644 --- a/yaml/transform/command.go +++ b/yaml/transform/command.go @@ -40,7 +40,7 @@ func toScript(commands []string) string { var buf bytes.Buffer for _, command := range commands { escaped := fmt.Sprintf("%q", command) - escaped = strings.Replace(command, "$", `$\`, -1) + escaped = strings.Replace(escaped, "$", `\$`, -1) buf.WriteString(fmt.Sprintf( traceScript, escaped,