Skip to content

Commit

Permalink
feat(tap): Only tap homebrew/core if tap is empty
Browse files Browse the repository at this point in the history
In order to make the operation faster, and add `--force` option to run correctly.
  • Loading branch information
5ouma committed Dec 12, 2023
1 parent 855e1f1 commit 5b7ef13
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ def read_brew(*args)
git 'config', '--global', 'user.name', user_name
git 'config', '--global', 'user.email', user_email

# Always tap homebrew/core, otherwise brew can't find formulae
brew 'tap', 'homebrew/core'

# Tap the requested tap if applicable
brew 'tap', tap unless tap.blank?
if tap.blank?
brew 'tap', 'homebrew/core', '--force'
else
# Tap the requested tap if applicable
brew 'tap', tap
end

# Append additional PR message
message = if message.blank?
Expand Down

0 comments on commit 5b7ef13

Please sign in to comment.