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

brew install not respecting tap when formula name collides with core #16213

Closed
3 tasks done
amancevice opened this issue Nov 13, 2023 · 1 comment · Fixed by #16216
Closed
3 tasks done

brew install not respecting tap when formula name collides with core #16213

amancevice opened this issue Nov 13, 2023 · 1 comment · Fixed by #16216
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age

Comments

@amancevice
Copy link
Contributor

amancevice commented Nov 13, 2023

brew doctor output

Your system is ready to brew.

Verification

  • My "brew doctor output" above says Your system is ready to brew. and am still able to reproduce my issue.
  • I ran brew update twice and am still able to reproduce my issue.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

HOMEBREW_VERSION: 4.1.20-2-gd72ee37
ORIGIN: https://github.com/Homebrew/brew
HEAD: d72ee37f60e287e833ef9b1882bc6ca8ded01aea
Last commit: 2 hours ago
Core tap JSON: 13 Nov 15:42 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_BROWSER: open
HOMEBREW_CASK_OPTS: []
HOMEBREW_EDITOR: vi
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 2.6.10 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 15.0.0 build 1500
Git: 2.42.1 => /opt/homebrew/bin/git
Curl: 8.4.0 => /usr/bin/curl
macOS: 14.2-arm64
CLT: 15.0.0.0.1.1694021235
Xcode: 15.0
Rosetta 2: false

What were you trying to do (and why)?

I want to install terraform from hashicorp/tap:

brew install hashicorp/tap/terraform

What happened (include all command output)?

brew is preferring the formula in homebrew/core

What did you expect to happen?

I expect brew to respect the tap prefix in my command and install from there.

Note this definitely seems related to 97b4119 as when I checkout 4.1.20 (the previous commit) the issue goes away.

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

brew install hashicorp/tap/terraform                                                                                                   ⌘ /opt/homebrew/Library
==> Downloading https://ghcr.io/v2/homebrew/core/terraform/manifests/1.5.7
Already downloaded: /Users/spice/Library/Caches/Homebrew/downloads/2765dc205c0f89c57475889f81e01a98697bdbcbe4f638d40f7af02f7d4e61c4--terraform-1.5.7.bottle_manifest.json
==> Fetching terraform
==> Downloading https://ghcr.io/v2/homebrew/core/terraform/blobs/sha256:f43afa7c6970e1bc768f739829ee589e88fd2b9275f867c5d0be60369ce0772e
Already downloaded: /Users/spice/Library/Caches/Homebrew/downloads/035ebdf8caeb70e899395805af7e655cf61fcda92aaffd3f96172667b2e19081--terraform--1.5.7.arm64_sonoma.bottle.tar.gz
==> Pouring terraform--1.5.7.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/terraform/1.5.7: 6 files, 69.7MB
==> Running `brew cleanup terraform`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
@amancevice amancevice added the bug Reproducible Homebrew/brew bug label Nov 13, 2023
@amancevice
Copy link
Contributor Author

The workaround is to install with an abs path:

brew install --formula /opt/homebrew/Library/Taps/hashicorp/homebrew-tap/Formula/terraform.rb

or checkout 4.1.20:

cd /opt/homebrew
git checkout 4.1.20

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/brew bug outdated PR was locked due to age
Projects
None yet
1 participant