From 5d1e6481940554def0e436123bcf7e1fc5519002 Mon Sep 17 00:00:00 2001
From: Xu Cheng <xucheng@me.com>
Date: Tue, 19 Apr 2016 14:19:50 +0800
Subject: [PATCH] test-bot: prevent infinite loop caused by unavailable
 formula.

Noted, `brew tap foo` will not fail if the tap is already installed.
---
 Library/Homebrew/cmd/test-bot.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Library/Homebrew/cmd/test-bot.rb b/Library/Homebrew/cmd/test-bot.rb
index 5b73be2b71..c9a968ef6b 100644
--- a/Library/Homebrew/cmd/test-bot.rb
+++ b/Library/Homebrew/cmd/test-bot.rb
@@ -247,6 +247,7 @@ module Homebrew
     def safe_formula_canonical_name(formula_name)
       Formulary.factory(formula_name).full_name
     rescue TapFormulaUnavailableError => e
+      raise if e.tap.installed?
       test "brew", "tap", e.tap.name
       retry unless steps.last.failed?
     rescue FormulaUnavailableError, TapFormulaAmbiguityError, TapFormulaWithOldnameAmbiguityError
-- 
GitLab