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
|
# we downcase to avoid case-insensitive filesystem issues
|
||||||
tapd = HOMEBREW_LIBRARY/"Taps/#{user.downcase}-#{repo.downcase}"
|
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}"
|
abort unless system "git clone https://github.com/#{repouser}/homebrew-#{repo} #{tapd}"
|
||||||
|
|
||||||
files = []
|
files = []
|
||||||
|
|||||||
@ -221,6 +221,11 @@ class CompilerSelectionError < StandardError
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# raised in install_tap
|
||||||
|
class AlreadyTappedError < RuntimeError
|
||||||
|
def initialize; super "Already tapped!" end
|
||||||
|
end
|
||||||
|
|
||||||
# raised in CurlDownloadStrategy.fetch
|
# raised in CurlDownloadStrategy.fetch
|
||||||
class CurlDownloadStrategyError < RuntimeError; end
|
class CurlDownloadStrategyError < RuntimeError; end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user