File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ import (
2222 "strings"
2323
2424 "github.com/hashicorp/go-version"
25- yaml "gopkg.in/yaml.v2"
25+ "gopkg.in/yaml.v2"
2626
2727 "github.com/dapr/cli/pkg/print"
2828 "github.com/dapr/cli/utils"
@@ -120,7 +120,11 @@ func GetLatestReleaseGithub(githubURL string) (string, error) {
120120
121121 for _ , release := range githubRepoReleases {
122122 if ! strings .Contains (release .TagName , "-rc" ) {
123- cur , _ := version .NewVersion (strings .TrimPrefix (release .TagName , "v" ))
123+ 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+ }
124128 if cur .GreaterThan (latestVersion ) {
125129 latestVersion = cur
126130 }
You can’t perform that action at this time.
0 commit comments