Commit 3d2b5a3a authored by Fabio Pelosin's avatar Fabio Pelosin

[Lockfile] Encode checksums only if supported.

parent 0bc6cc41
...@@ -254,7 +254,9 @@ module Pod ...@@ -254,7 +254,9 @@ module Pod
checksums = {} checksums = {}
specs.select {|spec| !spec.defined_in_file.nil? }.each do |spec| specs.select {|spec| !spec.defined_in_file.nil? }.each do |spec|
checksums[spec.name] = Digest::SHA1.hexdigest(File.read(spec.defined_in_file)).encode('UTF-8') checksum = Digest::SHA1.hexdigest(File.read(spec.defined_in_file))
checksum = checksum.encode('UTF-8') if checksum.respond_to?(:encode)
checksums[spec.name] = checksum
end end
hash["SPECS CHECKSUM"] = checksums unless checksums.empty? hash["SPECS CHECKSUM"] = checksums unless checksums.empty?
hash["COCOAPODS"] = VERSION hash["COCOAPODS"] = VERSION
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment