Allow brew log on deleted formulae.

Closes Homebrew/homebrew#19995.
This commit is contained in:
Adam Vandenberg 2013-05-23 09:21:33 -07:00
parent 9212e1b1ee
commit 46d2b2165a

View File

@ -4,9 +4,14 @@ module Homebrew extend self
cd HOMEBREW_REPOSITORY
exec "git", "log", *ARGV.options_only
else
path = ARGV.formulae.first.path.realpath
begin
path = ARGV.formulae.first.path.realpath
rescue FormulaUnavailableError
# Maybe the formula was deleted
path = HOMEBREW_REPOSITORY/"Library/Formula/#{ARGV.named.first}.rb"
end
cd path.dirname # supports taps
exec "git", "log", *ARGV.options_only + [path]
exec "git", "log", *ARGV.options_only + ["--", path]
end
end
end