From aff66c3b86e13e4e85277217c67623dff9da0ef5 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Sat, 8 Jun 2013 10:27:47 -0700 Subject: Sniff for non-tarred gzips Don't try to untar non-tarred gzips. --- Library/Homebrew/extend/pathname.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Library/Homebrew/extend') diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 25bb1e537..b6a47d520 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -177,6 +177,10 @@ class Pathname # OS X installer package return :pkg if self.extname == '.pkg' + # If the filename ends with .gz not preceded by .tar + # then we want to gunzip but not tar + return :gzip_only if self.extname == '.gz' + # Get enough of the file to detect common file types # POSIX tar magic has a 257 byte offset # magic numbers stolen from /usr/share/file/magic/ -- cgit v1.2.3