aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend/pathname.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2013-06-08 10:27:47 -0700
committerAdam Vandenberg2013-06-08 15:37:32 -0700
commitaff66c3b86e13e4e85277217c67623dff9da0ef5 (patch)
treedc122c65e6b445974ede0450bae5a0674a233a60 /Library/Homebrew/extend/pathname.rb
parentf848a0834487c27ce9608328ab8a4575d3d8fedb (diff)
downloadbrew-aff66c3b86e13e4e85277217c67623dff9da0ef5.tar.bz2
Sniff for non-tarred gzips
Don't try to untar non-tarred gzips.
Diffstat (limited to 'Library/Homebrew/extend/pathname.rb')
-rw-r--r--Library/Homebrew/extend/pathname.rb4
1 files changed, 4 insertions, 0 deletions
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/