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,