dev-cmd/tap-new: throw an error when tap is installed

This commit is contained in:
Ruoyu Zhong 2023-05-11 01:29:57 +08:00
parent 03bf6cc431
commit 54a5690391
No known key found for this signature in database

View File

@ -36,6 +36,7 @@ module Homebrew
tap = args.named.to_taps.fetch(0) tap = args.named.to_taps.fetch(0)
odie "Invalid tap name '#{tap}'" unless tap.path.to_s.match?(HOMEBREW_TAP_PATH_REGEX) 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_user = tap.user.dup
titleized_repo = tap.repo.dup titleized_repo = tap.repo.dup