Merge pull request #3083 from cli/update-notice-redirect
Avoid checking for new releases when authenticating git
This commit is contained in:
commit
6b483aa468
1 changed files with 1 additions and 5 deletions
|
|
@ -236,7 +236,7 @@ func shouldCheckForUpdate() bool {
|
|||
if os.Getenv("CODESPACES") != "" {
|
||||
return false
|
||||
}
|
||||
return updaterEnabled != "" && !isCI() && !isCompletionCommand() && utils.IsTerminal(os.Stderr)
|
||||
return updaterEnabled != "" && !isCI() && utils.IsTerminal(os.Stdout) && utils.IsTerminal(os.Stderr)
|
||||
}
|
||||
|
||||
// based on https://github.com/watson/ci-info/blob/HEAD/index.js
|
||||
|
|
@ -246,10 +246,6 @@ func isCI() bool {
|
|||
os.Getenv("RUN_ID") != "" // TaskCluster, dsari
|
||||
}
|
||||
|
||||
func isCompletionCommand() bool {
|
||||
return len(os.Args) > 1 && os.Args[1] == "completion"
|
||||
}
|
||||
|
||||
func checkForUpdate(currentVersion string) (*update.ReleaseInfo, error) {
|
||||
if !shouldCheckForUpdate() {
|
||||
return nil, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue