Browse Source

Allow wider definition for _zip?

Some zip files have a different definition, e.g.
Minecraft has:

    application/xml; charset=utf-8 compressed-encoding=application/zip;
      charset=binary; charset=binary

Most other zips have:

    application/x-empty; compressed-encoding=application/zip;
      charset=binary; charset=binary

But the result is the same. So now we test only for:

    compressed-encoding=application/zip; charset=binary; charset=binary
Félix Saparelli 12 years ago
parent
commit
51e5760615
  1. 2
      lib/cask.rb

2
lib/cask.rb

@ -199,7 +199,7 @@ class Cask
def _zip?(path)
output = `file -Izb #{path}`
output.chomp == 'application/x-empty compressed-encoding=application/zip; charset=binary; charset=binary'
output.chomp.include? 'compressed-encoding=application/zip; charset=binary; charset=binary'
end
def _tar_bzip?(path)

Loading…
Cancel
Save