From 954edb288572d0b054aca985f6702d7cad606ab6 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Mon, 16 Jul 2018 21:36:18 +0200 Subject: [PATCH] Alias `extract_nestedly` to `extract` for uncompressed files. --- Library/Homebrew/unpack_strategy.rb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/unpack_strategy.rb b/Library/Homebrew/unpack_strategy.rb index 57ee57ab67..84def55eb9 100644 --- a/Library/Homebrew/unpack_strategy.rb +++ b/Library/Homebrew/unpack_strategy.rb @@ -69,11 +69,6 @@ class UnpackStrategy end def extract_nestedly(to: nil, basename: nil) - if is_a?(UncompressedUnpackStrategy) - extract(to: to, basename: basename) - return - end - Dir.mktmpdir do |tmp_unpack_dir| tmp_unpack_dir = Pathname(tmp_unpack_dir) @@ -106,6 +101,8 @@ class DirectoryUnpackStrategy < UnpackStrategy end class UncompressedUnpackStrategy < UnpackStrategy + alias extract_nestedly extract + private def extract_to_dir(unpack_dir, basename:)