Skip to content
Snippets Groups Projects
Commit 171f65a1 authored by JCount's avatar JCount
Browse files

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
parent 4d6e3199
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment