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

Use full names for linked and keg_only checks #1550

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(install): use full names for linked and keg_only checks
Minimal repro:

```console
❯ brew bundle --file - <<<'tap "gibfahn/tap", "https://github.com/gibfahn/homebrew-tap"
tap "gibfahn/tap2", "https://github.com/gibfahn/homebrew-tap"

brew "gibfahn/tap/check-sieve"'

Using gibfahn/tap
Using gibfahn/tap2
Using gibfahn/tap/check-sieve
Error: Formulae found in multiple taps:
       * gibfahn/tap/check-sieve
       * gibfahn/tap2/check-sieve

Please use the fully-qualified name (e.g. gibfahn/tap/check-sieve) to refer to a specific formula.
```

If you run with `HOMEBREW_DEBUG=1` you can see that the cause of this is
using the `@name` rather than the `@full_name` in the checks run after
the installation is complete.
  • Loading branch information
gibfahn committed Jan 3, 2025
commit 9dfc1036c56a4edb461083a7792ee781f922ee7c
4 changes: 2 additions & 2 deletions lib/bundle/brew_installer.rb
Original file line number Diff line number Diff line change
@@ -187,11 +187,11 @@ def installed?
end

def linked?
Formula[@name].linked?
Formula[@full_name].linked?
end

def keg_only?
Formula[@name].keg_only?
Formula[@full_name].keg_only?
end

def unlinked_and_keg_only?
Loading