From d8624f5fe754b3d3bcbb0836ecd9fdbb974b9ea1 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Wed, 25 Jul 2018 10:03:50 +0200 Subject: [PATCH] Remove `MachO` check for `Executable`. --- Library/Homebrew/unpack_strategy/executable.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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