warn if unrar is needed but not found.

You can `brew unrar`

Closes Homebrew/homebrew#12858.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
This commit is contained in:
samueljohn 2012-06-15 11:53:05 +02:00 committed by Misty De Meo
parent ffe21a9cd1
commit f9b2761d77

View File

@ -87,6 +87,7 @@ class CurlDownloadStrategy < AbstractDownloadStrategy
safe_system '/usr/sbin/pkgutil', '--expand', @tarball_path, File.basename(@url)
chdir
when :rar
raise "You must install unrar: brew install unrar" unless which "unrar"
quiet_safe_system 'unrar', 'x', {:quiet_flag => '-inul'}, @tarball_path
else
# we are assuming it is not an archive, use original filename