diff options
| author | Jack Nagel | 2012-04-26 20:53:51 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-04-26 20:54:30 -0500 |
| commit | 439aa84a3bb985b8e01f9361594acbe2ee2cdc25 (patch) | |
| tree | bd7cf2942b54b7260dc1441eb9aad4076b64c97a /Library | |
| parent | db432b1b901442a6e86a73279a6cc42e13c86f14 (diff) | |
| download | homebrew-439aa84a3bb985b8e01f9361594acbe2ee2cdc25.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')
| -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 |
