Skip to content

Commit

Permalink
tap: never throw AlreadyTappedError.
Browse files Browse the repository at this point in the history
Just make it a warning instead.

Closes Homebrew#25511.
Closes Homebrew#25617.
  • Loading branch information
MikeMcQuaid authored and ehershey committed Apr 4, 2014
1 parent 87653a3 commit 257aefb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Library/Homebrew/cmd/tap.rb
Expand Up @@ -10,7 +10,7 @@ def tap
elsif ARGV.first == "--repair"
repair_taps
else
install_tap(*tap_args)
opoo "Already tapped!" unless install_tap(*tap_args)
end
end

Expand All @@ -23,7 +23,7 @@ def install_tap user, repo

# we downcase to avoid case-insensitive filesystem issues
tapd = HOMEBREW_LIBRARY/"Taps/#{user.downcase}-#{repo.downcase}"
raise AlreadyTappedError if tapd.directory?
return false if tapd.directory?
abort unless system "git clone https://github.com/#{repouser}/homebrew-#{repo} #{tapd}"

files = []
Expand All @@ -46,6 +46,8 @@ def install_tap user, repo
puts " git remote set-url origin git@github.com:#{repouser}/homebrew-#{repo}.git"
puts
end

true
end

def link_tap_formula formulae
Expand Down

0 comments on commit 257aefb

Please sign in to comment.