Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh uninstall should be disallowed #194979

Open
4 tasks done
J-Siu opened this issue Oct 19, 2024 · 2 comments
Open
4 tasks done

gh uninstall should be disallowed #194979

J-Siu opened this issue Oct 19, 2024 · 2 comments
Labels
bug Reproducible Homebrew/homebrew-core bug

Comments

@J-Siu
Copy link

J-Siu commented Oct 19, 2024

brew gist-logs <formula> link OR brew config AND brew doctor output

$ brew config
HOMEBREW_VERSION: 4.4.1-62-g6f17b06
ORIGIN: https://github.com/Homebrew/brew
HEAD: 6f17b0644771e0a1d7c15ac72471dae2ef87314a
Last commit: 25 hours ago
Core tap HEAD: e22300c7fb9e4485cb70388475e37242d4a0e8f3
Core tap last commit: 11 minutes ago
Core tap JSON: 19 Oct 19:43 UTC
Core cask tap HEAD: 6d5187f2e2a5f3943e1a04fb485973e5ea002893
Core cask tap last commit: 15 minutes ago
Core cask tap JSON: 19 Oct 19:43 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.3.5 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/bin/ruby
CPU: octa-core 64-bit arm_blizzard_avalanche
Clang: 16.0.0 build 1600
Git: 2.47.0 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.0.1-arm64
CLT: 16.0.0.0.1.1724870825
Xcode: 16.0
Rosetta 2: false

$ brew doctor
Your system is ready to brew.

Verification

  • My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.
  • I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.

What were you trying to do (and why)?

I uninstalled gh as I am not using it.

Then I notice gh was installed automatically when I did brew upgarde, and realized it is a dependency of brew.

What happened (include all command output)?

$ brew uninstall gh
Uninstalling /opt/homebrew/Cellar/gh/2.59.0... (207 files, 41.3MB)

$ brew upgrade
==> Installing `gh` for verifying attestations...
==> Downloading https://ghcr.io/v2/homebrew/core/gh/manifests/2.59.0
Already downloaded: /Users/js/Library/Caches/Homebrew/downloads/8a3b839873ef210d8d11c27103fbcd41928738b2605c500a20c1108e625d3c16--gh-2.59.0.bottle_manifest.json
==> Fetching gh
==> Downloading https://ghcr.io/v2/homebrew/core/gh/blobs/sha256:4db292686e8c16f6282f60ef492e3986e1407d6b6d1675d8588218ee20032e42
Already downloaded: /Users/js/Library/Caches/Homebrew/downloads/543ff4eeba8c42bddb50700575e73a8781858f76bfd4a6bfc69c733db2b9f3b6--gh--2.59.0.arm64_sequoia.bottle.tar.gz
==> Pouring gh--2.59.0.arm64_sequoia.bottle.tar.gz
==> Caveats
zsh completions have been installed to:
  /opt/homebrew/share/zsh/site-functions
==> Summary
🍺  /opt/homebrew/Cellar/gh/2.59.0: 207 files, 41.3MB
==> Running `brew cleanup gh`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

What did you expect to happen?

It should not allow me to uninstall it, with message explaining it is a dependency of homebrew.

Step-by-step reproduction instructions (by running brew commands)

  1. Do brew update and upgrade to be sure nothing is pending
brew update
brew upgrade
  1. Uninstall gh
brew uninstall gh
  1. brew upgrade should be clean, but instead it pull gh
brew upgrade
@J-Siu J-Siu added the bug Reproducible Homebrew/homebrew-core bug label Oct 19, 2024
@Bo98
Copy link
Member

Bo98 commented Oct 19, 2024

gh being required is a temporary measure that we hope to fix soon. Disabling developer mode should however avoid it being installed (brew developer off).

@J-Siu
Copy link
Author

J-Siu commented Oct 19, 2024

@Bo98 I see. Thank you! It work.

Not sure when/why it was enable on my box. Turning it off also tell me to untap core and cask too. Brew is much faster now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/homebrew-core bug
Projects
None yet
Development

No branches or pull requests

2 participants