mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
28 lines
497 B
Ruby
28 lines
497 B
Ruby
# frozen_string_literal: true
|
|
|
|
module UnpackStrategy
|
|
# Strategy for unpacking pax archives.
|
|
class Pax
|
|
include UnpackStrategy
|
|
|
|
using Magic
|
|
|
|
def self.extensions
|
|
[".pax"]
|
|
end
|
|
|
|
def self.can_extract?(_path)
|
|
false
|
|
end
|
|
|
|
private
|
|
|
|
def extract_to_dir(unpack_dir, basename:, verbose:)
|
|
system_command! "pax",
|
|
args: ["-rf", path],
|
|
chdir: unpack_dir,
|
|
verbose: verbose
|
|
end
|
|
end
|
|
end
|