From 3b23cf102f6778540766e1db0fca31ecabebc6d4 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Tue, 7 Aug 2012 09:18:14 -0400 Subject: [PATCH] `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. --- Library/Homebrew/cmd/tap.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index ee083eb00c..ecc5ab270a 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -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