diff --git a/Library/Homebrew/unpack_strategy/executable.rb b/Library/Homebrew/unpack_strategy/executable.rb index 85964fcd06..020a86b99f 100644 --- a/Library/Homebrew/unpack_strategy/executable.rb +++ b/Library/Homebrew/unpack_strategy/executable.rb @@ -1,17 +1,9 @@ require_relative "uncompressed" -require "vendor/macho/macho" - module UnpackStrategy class Executable < Uncompressed def self.can_extract?(path:, magic_number:) - return true if magic_number.match?(/\A#!\s*\S+/n) - - begin - path.file? && MachO.open(path).header.executable? - rescue MachO::NotAMachOError - false - end + magic_number.match?(/\A#!\s*\S+/n) end end end