1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00

Merge pull request #1772 from benschumacher/bugfix/command

Correct escaping of commands in YAML
This commit is contained in:
Brad Rydzewski 2016-08-25 12:11:59 -07:00 committed by GitHub
commit e932bc8871

View File

@ -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,