Skip to content

Commit

Permalink
Fixed nil pointer when getting repo
Browse files Browse the repository at this point in the history
  • Loading branch information
BSick7 committed Sep 15, 2021
1 parent 826b3f4 commit 3d1d9a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/get_commit_sha.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ func getCurrentCommitSha() (string, error) {
if err != nil {
return "", err
}
if repo == nil {
return "", nil
}
ref, err := repo.Head()
if err != nil {
return "", err
Expand Down

0 comments on commit 3d1d9a5

Please sign in to comment.