Skip to content

Commit

Permalink
fix: don't crash when prvious tag is not available
Browse files Browse the repository at this point in the history
- on new repos PreviousTag is not available, this would result in a crash
  • Loading branch information
fallion committed Oct 19, 2019
1 parent 08c6340 commit 9095d00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var publishCmd = &cobra.Command{

lastTag, err := repo.PreviousTag(currentCommit.Hash)

if err != nil {
if err != nil && err != history.ErrPrevTagNotAvailable {
return err
}

Expand Down

0 comments on commit 9095d00

Please sign in to comment.