mirror of
https://github.com/gosticks/brew.git
synced 2026-10-07 07:57:00 +00:00
cmd/uninstall: fix Array comparison
In #7526 a comparison for `paths` was introduced, but if `paths` is ever `nil`, this triggers an error. Coercing the variable to an Array should alleviate this problem, as `nil.to_a` produces an empty and comparable Array. Fixes #7540 Signed-off-by: Mike Fiedler <miketheman@gmail.com>
This commit is contained in:
@@ -92,7 +92,7 @@ module Homebrew
|
||||
end
|
||||
|
||||
unversioned_name = f.name.gsub(/@.+$/, "")
|
||||
maybe_paths = Dir.glob("#{f.etc}/*#{unversioned_name}*") - paths
|
||||
maybe_paths = Dir.glob("#{f.etc}/*#{unversioned_name}*") - paths.to_a
|
||||
if maybe_paths.present?
|
||||
puts
|
||||
opoo <<~EOS
|
||||
|
||||
Reference in New Issue
Block a user