cmd/upgrade: fix ofail/opoo call.
This method doesn't exist on `Kernel` any more. While we're here, let's avoid `public_send` and use `if` instead for a bit more safety.
This commit is contained in:
parent
3bbff84ff1
commit
5718e87e5e
@ -196,10 +196,13 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
if pinned.any?
|
if pinned.any?
|
||||||
Kernel.public_send(
|
message = "Not upgrading #{pinned.count} pinned #{Utils.pluralize("package", pinned.count)}:"
|
||||||
formulae.any? ? :ofail : :opoo, # only fail when pinned formulae are named explicitly
|
# only fail when pinned formulae are named explicitly
|
||||||
"Not upgrading #{pinned.count} pinned #{Utils.pluralize("package", pinned.count)}:",
|
if formulae.any?
|
||||||
)
|
ofail message
|
||||||
|
else
|
||||||
|
opoo message
|
||||||
|
end
|
||||||
puts pinned.map { |f| "#{f.full_specified_name} #{f.pkg_version}" } * ", "
|
puts pinned.map { |f| "#{f.full_specified_name} #{f.pkg_version}" } * ", "
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user