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:
Mike McQuaid 2024-12-10 15:13:29 +00:00 committed by GitHub
commit 5a4d643d7f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2005,6 +2005,8 @@ class Formula
# If called with no parameters, does this with all compatible
# universal binaries in a {Formula}'s {Keg}.
#
# Raises an error if no universal binaries are found to deuniversalize.
#
# @api public
sig { params(targets: T.nilable(T.any(Pathname, String))).void }
def deuniversalize_machos(*targets)
@ -2014,6 +2016,8 @@ class Formula
end
end
raise "No universal binaries found to deuniversalize" if targets.blank?
targets&.each do |target|
extract_macho_slice_from(Pathname(target), Hardware::CPU.arch)
end