Commit 8479939a authored by Samuel Giddins's avatar Samuel Giddins

[Downloader] Ensure can_cache and cache_path are consistent

parent b994b4af
......@@ -28,9 +28,11 @@ module Pod
request,
target,
can_cache: true,
cache_path: can_cache && !Config.instance.skip_download_cache && Config.instance.cache_root + 'Pods'
cache_path: Config.instance.cache_root + 'Pods'
)
if cache_path
can_cache &&= !Config.instance.skip_download_cache
if can_cache
raise ArgumentError, 'Must provide a `cache_path` when caching.' unless cache_path
cache = Cache.new(cache_path)
result = cache.download_pod(request)
else
......
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