parent
2b7b530bf5
commit
0de91ed257
|
@ -19,7 +19,7 @@ class Cask::Installer
|
|||
ohai "Success! #{cask} installed to #{cask.destination_path}"
|
||||
|
||||
unless cask.caveats.empty?
|
||||
ohai 'Caveats', cask.caveats
|
||||
ohai 'Caveats', cask.caveats
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -63,7 +63,7 @@ class Cask::Installer
|
|||
elsif _zip?(path)
|
||||
destdir = "/tmp/brewcask_#{@title}_extracted"
|
||||
`mkdir -p '#{destdir}'`
|
||||
`unzip -d '#{destdir}' '#{path}'`
|
||||
`unzip -d '#{destdir}' '#{path}' -x '__MACOSX/*'`
|
||||
begin
|
||||
yield destdir
|
||||
ensure
|
||||
|
|
|
@ -61,6 +61,14 @@ describe Cask::Installer do
|
|||
}, /Here are some things you might want to know/)
|
||||
with_caveats.must_be :installed?
|
||||
end
|
||||
|
||||
it "does not extract __MACOSX directories from zips" do
|
||||
with_macosx_dir = Cask.load('with-macosx-dir')
|
||||
shutup do
|
||||
Cask::Installer.install(with_macosx_dir)
|
||||
end
|
||||
with_macosx_dir.destination_path.join('__MACOSX').wont_be :directory?
|
||||
end
|
||||
end
|
||||
|
||||
describe "uninstall" do
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
class WithMacosxDir < TestCask
|
||||
url TestHelper.local_binary('MyFancyApp.zip')
|
||||
homepage 'http://example.com/MyFancyApp'
|
||||
version '1.2.3'
|
||||
sha1 'b0475c34136c8e00ceb4b95c245291d53d5deab3'
|
||||
end
|
Binary file not shown.
Loading…
Reference in New Issue