diff options
| author | Jack Nagel | 2012-04-26 20:53:51 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-04-26 20:54:30 -0500 |
| commit | cd4428bcb9c3b88d77c7416fb4d3bce242344ebf (patch) | |
| tree | eeae3a12b9df07016af36be0d29eb61b9ad07540 /Library/Homebrew | |
| parent | 07e24dda76142edfb18dd0fcb882f95fb91a8511 (diff) | |
| download | brew-cd4428bcb9c3b88d77c7416fb4d3bce242344ebf.tar.bz2 | |
CurlDownloadStrategy: fix .rar detection
We now read six bytes instead of four in order to detect xz compression;
this broke rar detection which used a string literal instead of a regexp
for comparison.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 3a68a2541..714ba2c31 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -96,7 +96,7 @@ class CurlDownloadStrategy < AbstractDownloadStrategy when '____pkg' safe_system '/usr/sbin/pkgutil', '--expand', @tarball_path, File.basename(@url) chdir - when 'Rar!' + when /Rar!/ quiet_safe_system 'unrar', 'x', {:quiet_flag => '-inul'}, @tarball_path else # we are assuming it is not an archive, use original filename |
