Tap users can have dashes, adjust regex

Repos can't at this point. Hard to easily fix so avoiding it until 2.0 or until someone moans enough.
This commit is contained in:
Max Howell 2012-08-04 13:56:36 -04:00
parent 385e5dacd2
commit e8c9a19f65

View File

@ -72,7 +72,7 @@ end
class Pathname
def tap_ref
case self.to_s
when %r{^#{HOMEBREW_LIBRARY}/Taps/(\w+)-(\w+)/(.+)}
when %r{^#{HOMEBREW_LIBRARY}/Taps/([a-z\-_]+)-(\w+)/(.+)}
"#$1/#$2/#{File.basename($3, '.rb')}"
when %r{^#{HOMEBREW_LIBRARY}/Formula/(.+)}
"mxcl/master/#{File.basename($1, '.rb')}"