Created
June 21, 2016 23:20
-
-
Save zsprackett/7d7051eb68468bc9ee4c63c4f042c65e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/hbc/container/zip.rb b/lib/hbc/container/zip.rb | |
index 5425d7f..2d59064 100644 | |
--- a/lib/hbc/container/zip.rb | |
+++ b/lib/hbc/container/zip.rb | |
@@ -1,6 +1,6 @@ | |
class Hbc::Container::Zip < Hbc::Container::Base | |
def self.me?(criteria) | |
- criteria.file.include? 'compressed-encoding=application/zip;' | |
+ criteria.file.include? 'compressed-encoding=application/zip;' or 'application/zip; charset=binary' | |
end | |
def extract |
diff --git a/lib/hbc/container/zip.rb b/lib/hbc/container/zip.rb
index 8118f9c..0a54cda 100644
--- a/lib/hbc/container/zip.rb
+++ b/lib/hbc/container/zip.rb
@@ -1,6 +1,6 @@
class Hbc::Container::Zip < Hbc::Container::Base
def self.me?(criteria)
- criteria.file.include? "compressed-encoding=application/zip;"
+ criteria.file.include? "compressed-encoding=application/zip;" or criteria.file.include? "application/zip; charset=binary"
end
def extract
@zachwalton, how do you apply this fix on a running homebrew ?
@salimane You need to apply the changes to /usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/container/zip.rb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is actually not doing what you think it does.
is effectively this:
So, if
criteria.file.include?('compressed-encoding=application/zip;')
evaluates tofalse
, the return value will be the string'application/zip; charset=binary'
. This leads to a non-nil return value no matter what.