Skip to content

Commit

Permalink
Merge pull request #18910 from chenrui333/deuniversalize_machos-raise…
Browse files Browse the repository at this point in the history
…-error

chore(formula): raise error if no universal binaries are found to deuniversalize
  • Loading branch information
MikeMcQuaid authored Dec 10, 2024
2 parents 03d29a5 + 5256937 commit 5a4d643
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2005,6 +2005,8 @@ def time
# 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)
Expand All @@ -2014,6 +2016,8 @@ def deuniversalize_machos(*targets)
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
Expand Down

0 comments on commit 5a4d643

Please sign in to comment.