brew tap by itself handles dashes in usernames

This stuff sucks. I'd like to just replace the dash with a directory division or tilde character. But this makes the code even more complicated, unless we can figure out how to migrate the taps.
This commit is contained in:
Max Howell 2012-08-07 09:18:14 -04:00
parent cbee0bd2ee
commit 3b23cf102f

View File

@ -4,7 +4,8 @@ module Homebrew extend self
if ARGV.empty?
tapd = HOMEBREW_LIBRARY/"Taps"
tapd.children.each do |tap|
puts tap.basename.sub('-', '/') if (tap/'.git').directory?
# only replace the *last* dash: yes, tap filenames suck
puts tap.basename.to_s.reverse.sub('-', '/').reverse if (tap/'.git').directory?
end if tapd.directory?
elsif ARGV.first == "--repair"
repair_taps