1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

fix: improve code a bit

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
Carlos Alexandro Becker 2020-03-31 10:34:06 -03:00
parent 7661587a9e
commit 375109acd7
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -168,11 +168,11 @@ func (c *githubClient) Upload(
},
file,
)
if resp.StatusCode == 422 {
if err == nil {
return nil
}
if resp != nil && resp.StatusCode == 422 {
return err
}
if err != nil {
return RetriableError{err}
}
return nil
return RetriableError{err}
}