diff options
| author | Max Howell | 2012-03-17 01:23:53 +0000 |
|---|---|---|
| committer | Max Howell | 2012-03-17 01:24:03 +0000 |
| commit | 04243da19831a9852293f23de21914fe7e44e970 (patch) | |
| tree | 67cc72399ec6808620477bf0a972c2d2730aa76c /Library | |
| parent | 9dbb4d6a087967677b5fb6ed89136a6ef653f018 (diff) | |
| download | homebrew-04243da19831a9852293f23de21914fe7e44e970.tar.bz2 | |
Report correct conflicting tap
Fixes:
$ brew tap adamv/alt
...blah blah blah..
$ brew tap josegonzalez/php
...blah blah blah...
Warning: Could not tap josegonzalez/php/php over mxcl/master/php
Where it should be "over adamv/alt/php".
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/tap.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index dcf308952..bef0dfb5b 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -30,11 +30,11 @@ module Homebrew extend self cd HOMEBREW_LIBRARY/"Formula" do formulae.each do |formula| - from = HOMEBREW_LIBRARY.join("Taps/#{formula}").tap_ref - to = HOMEBREW_LIBRARY.join("Formula/#{formula.basename}").tap_ref + from = HOMEBREW_LIBRARY.join("Taps/#{formula}") + to = HOMEBREW_LIBRARY.join("Formula/#{formula.basename}") # Unexpected, but possible, lets proceed as if nothing happened - formula.delete if from == to + formula.delete if to.symlink? and to.realpath == from # using the system ln is the only way to get relative symlinks system "ln -s ../Taps/#{formula} 2>/dev/null" @@ -42,7 +42,8 @@ module Homebrew extend self ignores << formula.basename.to_s tapped += 1 else - opoo "Could not tap #{Tty.white}#{from}#{Tty.reset} over #{Tty.white}#{to}#{Tty.reset}" + to = to.realpath if to.exist? + opoo "Could not tap #{Tty.white}#{from.tap_ref}#{Tty.reset} over #{Tty.white}#{to.tap_ref}#{Tty.reset}" end end end |
