From 20ea640a4c6b666a9e7215e0c7da8695c37fc695 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Ga=C4=87e=C5=A1a?= Date: Tue, 8 Mar 2022 13:28:24 +0100 Subject: [PATCH] fixed raw response dumping in client --- scm/client.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scm/client.go b/scm/client.go index 20ece1f21..d3d8a7d21 100644 --- a/scm/client.go +++ b/scm/client.go @@ -10,6 +10,7 @@ import ( "io" "net/http" "net/url" + "os" "strconv" "strings" "sync" @@ -167,7 +168,9 @@ func (c *Client) Do(ctx context.Context, in *Request) (*Response, error) { // dumps the response for debugging purposes. if c.DumpResponse != nil { - c.DumpResponse(res, true) + if raw, errDump := c.DumpResponse(res, true); errDump == nil { + _, _ = os.Stdout.Write(raw) + } } return newResponse(res), nil }