MCPcopy Create free account
hub / github.com/algolia/cli / shouldCheckForUpdate

Function shouldCheckForUpdate

pkg/cmd/root/root.go:392–397  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

390}
391
392func shouldCheckForUpdate() bool {
393 if os.Getenv("ALGOLIA_NO_UPDATE_NOTIFIER") != "" {
394 return false
395 }
396 return !utils.IsCI() && utils.IsTerminal(os.Stdout) && utils.IsTerminal(os.Stderr)
397}
398
399func checkForUpdate(cfg config.Config, currentVersion string) (*update.ReleaseInfo, error) {
400 if !shouldCheckForUpdate() {

Callers 1

checkForUpdateFunction · 0.85

Calls 1

IsCIFunction · 0.92

Tested by

no test coverage detected