Sha256: e2be58f96961f01400585efe6d42c84ccfc96783f6f6fece35c2afda52d86749

Contents?: true

Size: 962 Bytes

Versions: 3

Compression:

Stored size: 962 Bytes

Contents

module Pod
    module Downloader
        class Cache
            alias_method :old_ensure_matching_version, :ensure_matching_version
            def ensure_matching_version
                # Fix Concurrent building occasionally cleans the Pods cache directory #11826 #11827
                # https://github.com/CocoaPods/CocoaPods/pull/11827
                if Cache.respond_to?(:read_lock) && Cache.respond_to?(:write_lock)
                    version_file = root + "VERSION"
                    version = nil
                    Cache.read_lock(version_file) { version = version_file.read.strip if version_file.file? }

                    root.rmtree if version != Pod::VERSION && root.exist?
                    root.mkpath

                    Cache.write_lock(version_file) { version_file.open("w") { |f| f << Pod::VERSION } }
                else
                    old_ensure_matching_version
                end
            end
        end
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cocoapods-fix-cache-0.3.0 lib/cocoapods-fix-cache/fix-cache.rb
cocoapods-fix-cache-0.2.0 lib/cocoapods-fix-cache/fix-cache.rb
cocoapods-fix-cache-0.1.0 lib/cocoapods-fix-cache/fix-cache.rb