Skip to content

Commit

Permalink
fixed raw response dumping in client
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-gacesa committed Mar 8, 2022
1 parent 309df22 commit 20ea640
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"io"
"net/http"
"net/url"
"os"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit 20ea640

Please sign in to comment.