Skip to content

Commit 7249f85

Browse files
committed
correcly escape ldflags (therecipe/pull/1048 from @domust)
1 parent c0c124a commit 7249f85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/cmd/deploy/build_escape.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ func escapeFlags(ldFlags []string, ldFlagsCustom string) string {
3131
ldFlags = append(ldFlags, strings.Split(ldFlagsCustom, " ")...)
3232
}
3333

34-
if out := strings.Replace(strings.Join(ldFlags, "\" \""), "_DONT_ESCAPE_", " ", -1); len(out) > 0 {
35-
return fmt.Sprintf("\"%v\"", out)
34+
if out := strings.Replace(strings.Join(ldFlags, " "), "_DONT_ESCAPE_", " ", -1); len(out) > 0 {
35+
return fmt.Sprintf("%q", out)
3636
}
3737
return ""
3838
}

0 commit comments

Comments
 (0)