diff --git a/sv/semver.go b/sv/semver.go index f6e2350..1c0523c 100644 --- a/sv/semver.go +++ b/sv/semver.go @@ -18,7 +18,10 @@ func ToVersion(value string) (semver.Version, error) { version = "0.0.0" } v, err := semver.NewVersion(version) - return *v, err + if err != nil { + return semver.Version{}, err + } + return *v, nil } // BreakingChangeTag breaking change tag from commit metadata