mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
19 lines
414 B
Ruby
19 lines
414 B
Ruby
# frozen_string_literal: true
|
|
|
|
module UnpackStrategy
|
|
# Strategy for unpacking uncompressed files.
|
|
class Uncompressed
|
|
include UnpackStrategy
|
|
|
|
def extract_nestedly(prioritise_extension: false, **options)
|
|
extract(**options)
|
|
end
|
|
|
|
private
|
|
|
|
def extract_to_dir(unpack_dir, basename:, verbose:)
|
|
FileUtils.cp path, unpack_dir/basename, preserve: true, verbose: verbose
|
|
end
|
|
end
|
|
end
|