Skip to content

Commit

Permalink
chore(api): update github api endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
pinglin committed Mar 3, 2024
1 parent bbcc674 commit f07ee71
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 0 additions & 6 deletions cmd/inst/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (

"github.com/AlecAivazis/survey/v2/terminal"
"github.com/cli/safeexec"
"github.com/dotenv-org/godotenvvault"
"github.com/mattn/go-colorable"
"github.com/mgutz/ansi"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -47,11 +46,6 @@ func main() {
}

func mainRun() exitCode {
// optionally load .env in dev mode
if build.Version == "" {
_ = godotenvvault.Load()
}

buildDate := build.Date
buildVersion := build.Version

Expand Down
3 changes: 1 addition & 2 deletions internal/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,10 @@ func CheckForUpdate(client *api.Client, stateFilePath, repo, currentVersion stri

func getLatestReleaseInfo(client *api.Client, repo string) (*ReleaseInfo, error) {
var latestRelease ReleaseInfo
err := client.REST("github.com", "GET", fmt.Sprintf("repos/%s/releases/latest", repo), nil, &latestRelease)
err := client.REST("api.github.com", "GET", fmt.Sprintf("repos/%s/releases/latest", repo), nil, &latestRelease)
if err != nil {
return nil, err
}

return &latestRelease, nil
}

Expand Down

0 comments on commit f07ee71

Please sign in to comment.