mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
11 lines
251 B
Ruby
11 lines
251 B
Ruby
![]() |
require_relative "uncompressed"
|
||
|
|
||
|
module UnpackStrategy
|
||
|
class Pkg < Uncompressed
|
||
|
def self.can_extract?(path:, magic_number:)
|
||
|
path.extname.match?(/\A.m?pkg\Z/) &&
|
||
|
(path.directory? || magic_number.match?(/\Axar!/n))
|
||
|
end
|
||
|
end
|
||
|
end
|