From cd01e43c19174a0593d262cce00824fb13a7bc69 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Thu, 23 May 2013 09:21:33 -0700 Subject: Allow brew log on deleted formulae. Closes #19995. --- Library/Homebrew/cmd/log.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/cmd/log.rb b/Library/Homebrew/cmd/log.rb index 0fc65113e..5f0ef63c8 100644 --- a/Library/Homebrew/cmd/log.rb +++ b/Library/Homebrew/cmd/log.rb @@ -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 -- cgit v1.2.3