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
This commit is contained in:
JCount 2017-04-10 16:22:50 -04:00
parent 4d6e31999a
commit 171f65a1e4

View File

@ -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