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:
commit
1c85a717cc
@ -1,4 +1,8 @@
|
||||
# typed: strict
|
||||
# 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
|
||||
|
||||
10
Library/Homebrew/extend/os/linux/keg.rb
Normal file
10
Library/Homebrew/extend/os/linux/keg.rb
Normal 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
|
||||
@ -317,9 +317,6 @@ module FormulaCellarChecks
|
||||
|
||||
def check_binary_arches(formula)
|
||||
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)
|
||||
mismatches = {}
|
||||
|
||||
@ -530,7 +530,7 @@ class Keg
|
||||
end
|
||||
|
||||
def binary_executable_or_library_files
|
||||
elf_files
|
||||
[]
|
||||
end
|
||||
|
||||
def codesign_patched_binary(file); end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user