Skip to content

Commit

Permalink
curl: override any "-w" options that might exist
Browse files Browse the repository at this point in the history
See the code comment for an explanation.
  • Loading branch information
kevinburkesegment committed Apr 8, 2022
1 parent 4a3f1bb commit 1180934
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions curl/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ func Command(ctx context.Context, url string, options ...Option) *exec.Cmd {
args = append(args, arg)
}
}
// Override any settings that users might have by default - for example,
// Kevin Burke has "-w \n" in his .curlrc file. Adding a new line to the end
// of the file is great for readability for most responses but breaks pprof
// and trace parsing.
args = append(args, "-w", "")

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

0 comments on commit 1180934

Please sign in to comment.