From 5b7ef13fc71c5cdd804fb8512a43fd42c623f92a Mon Sep 17 00:00:00 2001 From: 5ouma <101255979+5ouma@users.noreply.github.com> Date: Tue, 12 Dec 2023 18:12:05 +0900 Subject: [PATCH] feat(tap): Only tap `homebrew/core` if `tap` is empty In order to make the operation faster, and add `--force` option to run correctly. --- main.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/main.rb b/main.rb index 1139572..805286f 100644 --- a/main.rb +++ b/main.rb @@ -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?