tap: use dedicated exception for already tapped.
This commit is contained in:
parent
0055e4dc5f
commit
1cb7eca3a5
@ -23,7 +23,7 @@ module Homebrew extend self
|
||||
|
||||
# we downcase to avoid case-insensitive filesystem issues
|
||||
tapd = HOMEBREW_LIBRARY/"Taps/#{user.downcase}-#{repo.downcase}"
|
||||
raise "Already tapped!" if tapd.directory?
|
||||
raise AlreadyTappedError if tapd.directory?
|
||||
abort unless system "git clone https://github.com/#{repouser}/homebrew-#{repo} #{tapd}"
|
||||
|
||||
files = []
|
||||
|
||||
@ -221,6 +221,11 @@ class CompilerSelectionError < StandardError
|
||||
end
|
||||
end
|
||||
|
||||
# raised in install_tap
|
||||
class AlreadyTappedError < RuntimeError
|
||||
def initialize; super "Already tapped!" end
|
||||
end
|
||||
|
||||
# raised in CurlDownloadStrategy.fetch
|
||||
class CurlDownloadStrategyError < RuntimeError; end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user