homebrew-cask-versions/lib/cask/container/zip.rb
Roland Walker a8acf3de1a bugfix: preserve resource forks when unzipping
Use the unarchiving ability built into the `ditto` utility,
rather explicitly calling the `unzip` utility.  Fixes
caskroom/homebrew-fonts#90.
2014-03-11 08:46:38 -04:00

11 lines
282 B
Ruby

require 'tmpdir'
class Cask::Container::Zip < Cask::Container::Base
def self.me?(criteria)
criteria.file.include? 'compressed-encoding=application/zip;'
end
def extract
@command.run!('/usr/bin/ditto', :args => ['-xk', '--', @path, @cask.destination_path])
end
end