From 171f65a1e44b4def783f67e1a0ac19d65ed495d9 Mon Sep 17 00:00:00 2001
From: JCount <JCount42@gmail.com>
Date: Mon, 10 Apr 2017 16:22:50 -0400
Subject: [PATCH] missing_formula: fix undefined method `path` for nil:NilClass

This check for a nil `tap` is necessary because Tap.from_path(path)
will simply return a nil value in the event the tap path is invalid
---
 Library/Homebrew/missing_formula.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Library/Homebrew/missing_formula.rb b/Library/Homebrew/missing_formula.rb
index 5b903b899e..eac3d77257 100644
--- a/Library/Homebrew/missing_formula.rb
+++ b/Library/Homebrew/missing_formula.rb
@@ -122,7 +122,7 @@ module Homebrew
         path = Formulary.path name
         return if File.exist? path
         tap = Tap.from_path(path)
-        return unless File.exist? tap.path
+        return if tap.nil? || !File.exist?(tap.path)
         relative_path = path.relative_path_from tap.path
 
         tap.path.cd do
-- 
GitLab