Skip to content

Commit

Permalink
fix: regression on nil pointer check (#2533)
Browse files Browse the repository at this point in the history
Signed-off-by: Engin Diri <engin.diri@mail.schwarz>
  • Loading branch information
Engin Diri committed Sep 28, 2021
1 parent cab04ef commit 8881328
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/client/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (c *githubClient) CreateFile(
path,
&github.RepositoryContentGetOptions{},
)
if err != nil && res.StatusCode != 404 {
if err != nil && (res == nil || res.StatusCode != 404) {
return err
}

Expand Down

0 comments on commit 8881328

Please sign in to comment.