Skip to content

Brew Upgrade GH doesnt initiate upgrade #299

Description

@designMoreWeb

Describe the bug

I am trying to update the CLI on mac using the brew update && brew upgrade gh command however it is giving me a message with

Warning: github/gh/gh 0.5.2 already installed

Not sure what needs to be done to update to 0.5.3

Steps to reproduce the behavior

  1. After installing the cli by using 'brew install github/gh/gh'
  2. Try running 'brew update && brew upgrade gh'
  3. See warning

Expected vs actual behavior

I expected it to initiate an update using homebrew

Logs

==> Tapping github/gh
Cloning into '/usr/local/Homebrew/Library/Taps/github/homebrew-gh'...
remote: Enumerating objects: 34, done.
remote: Counting objects: 100% (34/34), done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 166 (delta 8), reused 0 (delta 0), pack-reused 132
Receiving objects: 100% (166/166), 29.61 KiB | 2.47 MiB/s, done.
Resolving deltas: 100% (41/41), done.
Tapped 1 formula (28 files, 61.1KB).
==> Installing gh from github/gh
==> Downloading https://github.com/github/homebrew-gh/releases/download/v0.5.2/gh_0.5.2_macOS_amd64.tar.gz
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/212587282/a8165500-42ae-11ea-8d73-a12edaa54824?X-Amz-Algorithm=AW
######################################################################## 100.0%

A new release of gh is available: 0.5.2 → v0.5.3
https://github.com/cli/cli/releases/tag/v0.5.3

A new release of gh is available: 0.5.2 → v0.5.3
https://github.com/cli/cli/releases/tag/v0.5.3

==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d

zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/gh/0.5.2: 8 files, 13.4MB, built in 11 seconds

brew update && brew upgrade gh
Already up-to-date.
Warning: github/gh/gh 0.5.2 already installed

Activity

  1. mdogan commented on Feb 4, 2020

    @mdogan

    Version at https://github.com/github/homebrew-gh/blob/7f18e38ff44aabd8d2e61cdcde5c2eef43081c03/Formula/gh.rb#L4-L11 still shows 0.5.2.

    This commit github/homebrew-gh@f1814e9 created a new gh.rb file at the root of the repo with version 0.5.3. But gh.rb file should be in Formula directory.

  2. vilmibm commented on Feb 4, 2020

    @vilmibm
    Contributor

    oof, seems like it got broken in the recent clean-up. i'll look at it today.

  3. self-assigned this
    on Feb 4, 2020
  4. designMoreWeb commented on Feb 4, 2020

    @designMoreWeb
    Author

    Thanks for the fix

  5. ptn77 commented on Feb 21, 2022

    @ptn77

    Hi I'm getting a similar error when I use brew on mac to upgrade gh:
    brew upgrade gh
    Warning: gh 2.5.1 already installed

    how did you fix this?

  6. mislav commented on Feb 21, 2022

    @mislav
    Contributor

    @ptn77 gh 2.5.1 is already the latest available GitHub CLI version.

  7. ptn77 commented on Feb 21, 2022

    @ptn77

    @mislav sorry. I tried to run git init -b main and it's not recognizing the switch 'b', so I thought maybe I didn't have the correct version. I'm seeing a version 2.32.0 is needed?

  8. mislav commented on Feb 22, 2022

    @mislav
    Contributor

    If you wanted to update git, then you should have run brew upgrade git and not brew upgrade gh. Note that git and gh are different command-line tools.

    For git init -b, you will need git 2.28 or higher.

  9. reneknuvers commented on May 15, 2025

    @reneknuvers

    For what it's worth: on an Ubuntu system I had the same problem. It appeared a second instance was installed through apt which was out of date. sudo apt remove gh and then a brew reinstall gh did the trick.

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

Metadata

Metadata

Assignees

Labels

packagingpriority-1Affects a large population and inhibits work

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions