Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
CuriousLearner committed Aug 29, 2024
1 parent 288faed commit 811cd27
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,11 @@ func checkForUpdate(ctx context.Context, currentVersion string) (*version.Releas
return version.CheckForUpdate(ctx, http.DefaultClient, stateFilePath, repo, currentVersion)
}

func exitWithCode(code int) {
os.Exit(code)
}

// Execute adds all child commands to the root command and sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute() {
retcode := 0
defer exitWithCode(retcode)
defer func() { os.Exit(retcode) }()

// start update check process in the background
ctx := context.Background()
Expand Down

0 comments on commit 811cd27

Please sign in to comment.