Skip to content

Commit

Permalink
Merge pull request #78 from dogue/master
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanisham authored Apr 21, 2024
2 parents bcbf2c9 + cc8bf98 commit 3b06529
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion cli/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,10 @@ func getZLSDownloadUrl(version string, archDouble string) (string, error) {
return "", err
}

if len(taggedReleaseResponse.Assets) == 0 {
return "", errors.New("invalid ZLS version")
}

// getting platform information
var downloadUrl string
for _, asset := range taggedReleaseResponse.Assets {
Expand All @@ -285,7 +289,7 @@ func getZLSDownloadUrl(version string, archDouble string) (string, error) {
}

if downloadUrl == "" {
return "", errors.New("invalid release URl")
return "", errors.New("invalid ZLS release URL")
}

return downloadUrl, nil
Expand Down
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ func main() {
if *installDeps != "" {
switch *installDeps {
case "zls":

zvm.InstallZls(req.Package)

if err := zvm.InstallZls(req.Package); err != nil {
meta.CtaFatal(err)
}
}
}

Expand Down

0 comments on commit 3b06529

Please sign in to comment.