brew-test-bot: be more resilient to bad arguments.
This commit is contained in:
parent
324ea3e481
commit
5c88e8d654
@ -175,7 +175,7 @@ module Homebrew
|
|||||||
elsif formula
|
elsif formula
|
||||||
@formulae = [argument]
|
@formulae = [argument]
|
||||||
else
|
else
|
||||||
odie "#{argument} is not a pull request URL, commit URL or formula name."
|
raise ArgumentError.new("#{argument} is not a pull request URL, commit URL or formula name.")
|
||||||
end
|
end
|
||||||
|
|
||||||
@category = __method__
|
@category = __method__
|
||||||
@ -597,8 +597,14 @@ module Homebrew
|
|||||||
tests << test
|
tests << test
|
||||||
else
|
else
|
||||||
ARGV.named.each do |argument|
|
ARGV.named.each do |argument|
|
||||||
test = Test.new(argument, tap)
|
test_error = false
|
||||||
test_error = !test.run
|
begin
|
||||||
|
test = Test.new(argument, tap)
|
||||||
|
test_error = !test.run
|
||||||
|
rescue ArgumentError => e
|
||||||
|
test_error = true
|
||||||
|
ofail e.message
|
||||||
|
end
|
||||||
any_errors ||= test_error
|
any_errors ||= test_error
|
||||||
tests << test
|
tests << test
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user