Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions cocoapods-plugin/lib/cocoapods-xcremotecache/command/hooks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
require 'yaml'
require 'json'
require 'pathname'
require 'fileutils'


module CocoapodsXCRemoteCacheModifier
Expand Down Expand Up @@ -275,7 +276,7 @@ def self.download_xcrc_if_needed(local_location)

download_latest_xcrc_release(local_package_location)

if !system("unzip #{local_package_location} -d #{local_location}")
if !system("unzip", local_package_location, "-d", local_location)
throw "Unzipping XCRemoteCache failed"
end
end
Expand All @@ -295,11 +296,11 @@ def self.download_latest_xcrc_release(local_package_location)
throw "Downloading XCRemoteCache failed"
end

URI.open(asset_url, "accept" => 'application/octet-stream') do |f|
File.open(local_package_location, "wb") do |file|
file.puts f.read
end
end
uri = URI(asset_url)
options = { 'accept' => 'application/octet-stream' }
# File is > 10KB so Tempfile will be returned
downloaded_file = uri.open(options)
FileUtils.cp(downloaded_file, local_package_location)
end

def self.add_cflags!(options, key, value, exclude_sdks_configurations)
Expand Down