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 (
22
22
"strings"
23
23
24
24
"github.com/hashicorp/go-version"
25
- yaml "gopkg.in/yaml.v2"
25
+ "gopkg.in/yaml.v2"
26
26
27
27
"github.com/dapr/cli/pkg/print"
28
28
"github.com/dapr/cli/utils"
@@ -120,7 +120,11 @@ func GetLatestReleaseGithub(githubURL string) (string, error) {
120
120
121
121
for _ , release := range githubRepoReleases {
122
122
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
+ }
124
128
if cur .GreaterThan (latestVersion ) {
125
129
latestVersion = cur
126
130
}
You can’t perform that action at this time.
0 commit comments