(cfg config.Config, currentVersion string)
| 397 | } |
| 398 | |
| 399 | func checkForUpdate(cfg config.Config, currentVersion string) (*update.ReleaseInfo, error) { |
| 400 | if !shouldCheckForUpdate() { |
| 401 | return nil, nil |
| 402 | } |
| 403 | stateFilePath := filepath.Join(cfg.GetConfigFolder(os.Getenv("XDG_CONFIG_HOME")), "state.yml") |
| 404 | client := http.Client{} |
| 405 | return update.CheckForUpdate(&client, stateFilePath, currentVersion) |
| 406 | } |
| 407 | |
| 408 | // Check whether the CLI was found under the Homebrew prefix |
| 409 | func isUnderHomebrew(cli string) bool { |
no test coverage detected