Skip to content

Commit

Permalink
Don't tap homebrew/core and homebrew/cask (#13)
Browse files Browse the repository at this point in the history
Fixes #12.
  • Loading branch information
superatomic authored Dec 17, 2023
1 parent 820aed9 commit 5e532bb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/add.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e532bb

Please sign in to comment.