diff --git a/yaml/transform/command.go b/yaml/transform/command.go index cf4892f0..a90e8c2a 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,