From 053fa14fc26eca8732d441b1dba47ae56dd6626a Mon Sep 17 00:00:00 2001 From: Michael Cho Date: Wed, 2 Apr 2025 20:58:27 -0400 Subject: [PATCH] dev-cmd/unbottled: check arch requirement on Linux --- Library/Homebrew/dev-cmd/unbottled.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Homebrew/dev-cmd/unbottled.rb b/Library/Homebrew/dev-cmd/unbottled.rb index 99a741094a..3fb1880093 100644 --- a/Library/Homebrew/dev-cmd/unbottled.rb +++ b/Library/Homebrew/dev-cmd/unbottled.rb @@ -224,6 +224,11 @@ module Homebrew if requirements.any? { |r| r.is_a?(MacOSRequirement) && !r.version } puts "#{Tty.bold}#{Tty.red}#{name}#{Tty.reset}: requires macOS" if any_named_args next + elsif requirements.any? { |r| r.is_a?(ArchRequirement) && r.arch != @bottle_tag.arch } + if any_named_args + puts "#{Tty.bold}#{Tty.red}#{name}#{Tty.reset}: doesn't support #{@bottle_tag.arch} Linux" + end + next end elsif requirements.any?(LinuxRequirement) puts "#{Tty.bold}#{Tty.red}#{name}#{Tty.reset}: requires Linux" if any_named_args