From 9dfc1036c56a4edb461083a7792ee781f922ee7c Mon Sep 17 00:00:00 2001 From: Gibson Fahnestock Date: Fri, 3 Jan 2025 15:39:20 +0000 Subject: [PATCH] fix(install): use full names for linked and keg_only checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- lib/bundle/brew_installer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bundle/brew_installer.rb b/lib/bundle/brew_installer.rb index 3a6b3c064..f4bd2c10a 100644 --- a/lib/bundle/brew_installer.rb +++ b/lib/bundle/brew_installer.rb @@ -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?