Fix formula path usage in brew-gist-logs

Formula#path can no longer be a symlink.
This commit is contained in:
Jack Nagel 2014-05-26 11:18:30 -05:00
parent 45f09cd9c3
commit 84251bd44f

View File

@ -86,7 +86,7 @@ class HTTP_Error < RuntimeError
end
def repo_name f
dir = (f.path.symlink? ? f.path.realpath.dirname : HOMEBREW_REPOSITORY)
dir = f.path.dirname
url = dir.cd { `git config --get remote.origin.url` }
unless url =~ %r{github.com(?:/|:)([\w\d]+)/([\-\w\d]+)}
raise 'Unable to determine formula repository.'