Skip to content

Commit 1180934

Browse files
curl: override any "-w" options that might exist
See the code comment for an explanation.
1 parent 4a3f1bb commit 1180934

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

curl/command.go

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ func Command(ctx context.Context, url string, options ...Option) *exec.Cmd {
1414
args = append(args, arg)
1515
}
1616
}
17+
// Override any settings that users might have by default - for example,
18+
// Kevin Burke has "-w \n" in his .curlrc file. Adding a new line to the end
19+
// of the file is great for readability for most responses but breaks pprof
20+
// and trace parsing.
21+
args = append(args, "-w", "")
1722

1823
return exec.CommandContext(ctx, "curl", args...)
1924
}

0 commit comments

Comments
 (0)