mirror of
https://github.com/gosticks/brew.git
synced 2026-08-13 21:20:23 +00:00
Remove MachO check for Executable.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user