aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/versions.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/versions.rb b/Library/Homebrew/cmd/versions.rb
index 205f4467e..45968100f 100644
--- a/Library/Homebrew/cmd/versions.rb
+++ b/Library/Homebrew/cmd/versions.rb
@@ -77,6 +77,9 @@ class Formula
rev_list.find{ |sha| version == version_for_sha(sha) }
end
+ IGNORED_EXCEPTIONS = [SyntaxError, TypeError, NameError,
+ ArgumentError, FormulaSpecificationError]
+
def version_for_sha sha
mktemp do
path = Pathname.new(Pathname.pwd+"#{name}.rb")
@@ -86,7 +89,7 @@ class Formula
begin
Object.send(:remove_const, Formula.class_s(name))
nostdout { Formula.factory(path).version }
- rescue SyntaxError, TypeError, NameError, ArgumentError => e
+ rescue *IGNORED_EXCEPTIONS => e
# We rescue these so that we can skip bad versions and
# continue walking the history
ohai "#{e} in #{name} at revision #{sha}", e.backtrace if ARGV.debug?