Skip to content

Commit

Permalink
Merge pull request #176 from CircleCI-Public/fix-updater
Browse files Browse the repository at this point in the history
Fix defaultBaseURL for github client
  • Loading branch information
Zachary Scott authored Oct 23, 2018
2 parents cc156b3 + d42564b commit 3dd69a6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func newUpdateCommand(config *settings.Config) *cobra.Command {
opts := updateOptions{
cfg: config,
dryRun: false,
githubAPI: "https://api.github.com/api/v3",
githubAPI: "https://api.github.com/",
}

update := &cobra.Command{
Expand Down Expand Up @@ -86,7 +86,7 @@ func newUpdateCommand(config *settings.Config) *cobra.Command {

update.PersistentFlags().BoolVar(&opts.dryRun, "check", false, "Check if there are any updates available without installing")

update.PersistentFlags().StringVar(&opts.githubAPI, "github-api", "https://api.github.com/api/v3", "Change the default endpoint to GitHub API for retreiving updates")
update.PersistentFlags().StringVar(&opts.githubAPI, "github-api", "https://api.github.com/", "Change the default endpoint to GitHub API for retreiving updates")
if err := update.PersistentFlags().MarkHidden("github-api"); err != nil {
panic(err)
}
Expand Down Expand Up @@ -146,7 +146,6 @@ func findLatestPicardSha() (string, error) {

func updateCLI(opts updateOptions) error {
updater, err := selfupdate.NewUpdater(selfupdate.Config{
APIToken: "",
EnterpriseBaseURL: opts.githubAPI,
})
if err != nil {
Expand Down

0 comments on commit 3dd69a6

Please sign in to comment.