From 5e532bba3306842806bd7b0819ab913c6af61854 Mon Sep 17 00:00:00 2001 From: Olivia Kinnear Date: Sat, 16 Dec 2023 18:40:49 -0600 Subject: [PATCH] Don't tap `homebrew/core` and `homebrew/cask` (#13) Fixes #12. --- cmd/add.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/add.rb b/cmd/add.rb index eadcc69..733444c 100755 --- a/cmd/add.rb +++ b/cmd/add.rb @@ -84,9 +84,10 @@ def add end # If the formula/cask is from a tap that isn't tapped yet in the file, add it first. - unless bundle_taps.include?(brew.tap.name) + # Make sure not to tap homebrew/core or homebrew/cask, since these formulae install from the API. (Fixes issue #12) + unless bundle_taps.include?(brew.tap.name) || ['homebrew/core', 'homebrew/cask'].include?(brew.tap.name) file << "tap #{quote_type}#{brew.tap.name}#{quote_type}" << "\n" - oh1 "Added Tap #{Formatter.identifier(brew.tap.name)} to Brewfile" + oh1 "Added Tap #{Formatter.identifier(brew.tap.name)} to Brewfile" unless silent # Add the tap to the array for future iterations, so we don't add it to the Brewfile multiple times. bundle_taps << brew.tap.name