From 54a5690391cc76c292ae9ea0ccd6767cd6880ab5 Mon Sep 17 00:00:00 2001 From: Ruoyu Zhong Date: Thu, 11 May 2023 01:29:57 +0800 Subject: [PATCH] dev-cmd/tap-new: throw an error when tap is installed --- Library/Homebrew/dev-cmd/tap-new.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/dev-cmd/tap-new.rb b/Library/Homebrew/dev-cmd/tap-new.rb index bb8099a07b..5f9c2bcc53 100644 --- a/Library/Homebrew/dev-cmd/tap-new.rb +++ b/Library/Homebrew/dev-cmd/tap-new.rb @@ -36,6 +36,7 @@ module Homebrew tap = args.named.to_taps.fetch(0) odie "Invalid tap name '#{tap}'" unless tap.path.to_s.match?(HOMEBREW_TAP_PATH_REGEX) + odie "Tap is already installed!" if tap.installed? titleized_user = tap.user.dup titleized_repo = tap.repo.dup