Merge pull request #14421 from hyuraku/move_check_binary_arches-to-extend-os

move `check_binary_arches` to `extend/os`
This commit is contained in:
Mike McQuaid 2023-01-26 15:26:44 +00:00 committed by GitHub
commit 1c85a717cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 5 deletions

View File

@ -1,4 +1,8 @@
# typed: strict # typed: strict
# frozen_string_literal: true # frozen_string_literal: true
require "extend/os/mac/keg" if OS.mac? if OS.mac?
require "extend/os/mac/keg"
elsif OS.linux?
require "extend/os/linux/keg"
end

View File

@ -0,0 +1,10 @@
# typed: false
# frozen_string_literal: true
class Keg
undef binary_executable_or_library_files
def binary_executable_or_library_files
elf_files
end
end

View File

@ -317,9 +317,6 @@ module FormulaCellarChecks
def check_binary_arches(formula) def check_binary_arches(formula)
return unless formula.prefix.directory? return unless formula.prefix.directory?
# There is no `binary_executable_or_library_files` method for the generic OS
# TODO: Refactor and move to extend/os
return if !OS.mac? && !OS.linux? # rubocop:disable Homebrew/MoveToExtendOS
keg = Keg.new(formula.prefix) keg = Keg.new(formula.prefix)
mismatches = {} mismatches = {}

View File

@ -530,7 +530,7 @@ class Keg
end end
def binary_executable_or_library_files def binary_executable_or_library_files
elf_files []
end end
def codesign_patched_binary(file); end def codesign_patched_binary(file); end