Commit ef5f9a4f authored by Samuel E. Giddins's avatar Samuel E. Giddins

[Cache] Handle the expected spec not being found

This prevents us from handing out locations from the deleted tmpdir
parent c2de5502
......@@ -94,6 +94,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
[Samuel Giddins](https://github.com/segiddins)
[#3719](https://github.com/CocoaPods/CocoaPods/issues/3719)
* Attempting to specify a `git` source where a Podspec for the requested pod is
not found will have a more helpful error message.
[Samuel Giddins](https://github.com/segiddins)
## 0.37.2
......
......@@ -151,6 +151,7 @@ module Pod
def uncached_pod(request)
in_tmpdir do |target|
result, podspecs = download(request, target)
result.location = nil
podspecs.each do |name, spec|
destination = path_for_pod(request, :name => name, :params => result.checkout_options)
......
......@@ -99,6 +99,17 @@ module Pod
@cache.expects(:uncached_pod).once
@cache.download_pod(@unreleased_request)
end
it 'does not return a location when there is no spec with the request name' do
@stub_download.call do
@spec.name = 'OrangeLib'
File.open('BananaLib.podspec.json', 'w') { |f| f << @spec.to_pretty_json }
@spec.source
end
result = @cache.download_pod(@unreleased_request)
result.location.should.be.nil
result.spec.should.be.nil
end
end
end
......
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