Fix tests

`runtime_dependencies` is sometimes `nil`.
This commit is contained in:
Carlo Cabrera 2021-10-27 16:41:16 +08:00
parent 91e425f7dd
commit 96f0441178
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -130,7 +130,7 @@ class Keg
end
def openjdk_dep_name_if_applicable
runtime_dependencies.find do |dep|
runtime_dependencies&.find do |dep|
dep["full_name"].match? Version.formula_optionally_versioned_regex(:openjdk)
end&.fetch("full_name")
end