mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-06 03:13:48 +02:00
fix: check that the variable resp is not nil (#3670)
# If applied, this commit will Linked issues will be resolved. # Why is this change being made? Because the program will no longer have to refer to nil. # Provide links to any relevant tickets, URLs or other resources - https://github.com/goreleaser/goreleaser/issues/3669
This commit is contained in:
parent
71000969c0
commit
3734c2d9be
@ -325,10 +325,14 @@ func (c *githubClient) Upload(
|
||||
file,
|
||||
)
|
||||
if err != nil {
|
||||
requestID := ""
|
||||
if resp != nil {
|
||||
requestID = resp.Header.Get("X-GitHub-Request-Id")
|
||||
}
|
||||
log.WithFields(log.Fields{
|
||||
"name": artifact.Name,
|
||||
"release-id": releaseID,
|
||||
"request-id": resp.Header.Get("X-GitHub-Request-Id"),
|
||||
"request-id": requestID,
|
||||
}).Warn("upload failed")
|
||||
}
|
||||
if err == nil {
|
||||
|
Loading…
Reference in New Issue
Block a user