Merge pull request #18910 from chenrui333/deuniversalize_machos-raise-error
chore(formula): raise error if no universal binaries are found to deuniversalize
This commit is contained in:
commit
5a4d643d7f
@ -2005,6 +2005,8 @@ class Formula
|
|||||||
# If called with no parameters, does this with all compatible
|
# If called with no parameters, does this with all compatible
|
||||||
# universal binaries in a {Formula}'s {Keg}.
|
# universal binaries in a {Formula}'s {Keg}.
|
||||||
#
|
#
|
||||||
|
# Raises an error if no universal binaries are found to deuniversalize.
|
||||||
|
#
|
||||||
# @api public
|
# @api public
|
||||||
sig { params(targets: T.nilable(T.any(Pathname, String))).void }
|
sig { params(targets: T.nilable(T.any(Pathname, String))).void }
|
||||||
def deuniversalize_machos(*targets)
|
def deuniversalize_machos(*targets)
|
||||||
@ -2014,6 +2016,8 @@ class Formula
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
raise "No universal binaries found to deuniversalize" if targets.blank?
|
||||||
|
|
||||||
targets&.each do |target|
|
targets&.each do |target|
|
||||||
extract_macho_slice_from(Pathname(target), Hardware::CPU.arch)
|
extract_macho_slice_from(Pathname(target), Hardware::CPU.arch)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user