We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6d5e64d commit dcb5559Copy full SHA for dcb5559
pkg/version/version.go
@@ -22,7 +22,7 @@ import (
22
"strings"
23
24
"github.com/hashicorp/go-version"
25
- yaml "gopkg.in/yaml.v2"
+ "gopkg.in/yaml.v2"
26
27
"github.com/dapr/cli/pkg/print"
28
"github.com/dapr/cli/utils"
@@ -120,7 +120,11 @@ func GetLatestReleaseGithub(githubURL string) (string, error) {
120
121
for _, release := range githubRepoReleases {
122
if !strings.Contains(release.TagName, "-rc") {
123
- cur, _ := version.NewVersion(strings.TrimPrefix(release.TagName, "v"))
+ cur, curErr := version.NewVersion(strings.TrimPrefix(release.TagName, "v"))
124
+ if curErr != nil {
125
+ print.WarningStatusEvent(os.Stdout, "Failed to parse version: '%s'", curErr)
126
+ continue
127
+ }
128
if cur.GreaterThan(latestVersion) {
129
latestVersion = cur
130
}
0 commit comments