Skip to content

Disable the new release check #2107

Closed
Closed

Description

@danielfn

Describe the feature or problem you’d like to solve

In case we aren't using the latest CLI version, every time we run the CLI locally or inside a CI job, we get a message like the next:

A new release of gh is available: 0.10.1 → v1.0.0
https://github.com/cli/cli/releases/tag/v1.0.0

This message is printed to the stderr (which generates unnecessary noise in CI jobs) and also it causes a small delay due to the external request, so we would like to be able to disable this check in some way.

Proposed solution

A switch to enable/disable the new release check. For example, by using an environment variable GHCLI_CHECK_UPDATES=<true|false> and/or a new boolean setting check_updates for the gh config command.

Activity

  1. samcoe commented on Oct 7, 2020

    @samcoe
    Contributor

    @danielfn This seems like a good idea to me. My preference would be to have both an environment variable and a configuration setting. I think GH_UPDATE_CHECK <disabled | enabled> for the environment variable and update_check <disabled | enabled> for the configuration setting sound good. cc @ampinsk for design input.

    cc #743

  2. mislav commented on Oct 7, 2020

    @mislav
    Contributor

    @danielfn Sorry for the nuisance! Agreed that there should be a way to disable the notifications. Furthermore, I think that update checks should never run in CI environments by default.

    Closing as duplicate of #743 - follow that for updates!

  3. mislav commented on Oct 9, 2020

    @mislav
    Contributor

    @danielfn From the next release, update checker will be automatically disabled in CI environments (detected by the presence of environment variables such as CI) #2134

  4. danielfn commented on Oct 10, 2020

    @danielfn
    Author

    @mislav Great! Thanks for the heads up :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions