Commit 6b7aeade authored by Samuel E. Giddins's avatar Samuel E. Giddins

[Downloader] Only attempt to copy the download if theres a source location

Closes https://github.com/CocoaPods/CocoaPods/issues/3433
parent 17c098fc
...@@ -4,6 +4,16 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides ...@@ -4,6 +4,16 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
To install release candidates run `[sudo] gem install cocoapods --pre` To install release candidates run `[sudo] gem install cocoapods --pre`
## Master
##### Bug Fixes
* Don't crash when the downloader can't find an appropriate podspec in a `git`
pod.
[Samuel Giddins](https://github.com/segiddins)
[#3433](https://github.com/CocoaPods/CocoaPods/issues/3433)
## 0.37.0.beta.1 ## 0.37.0.beta.1
##### Enhancements ##### Enhancements
......
...@@ -32,7 +32,7 @@ module Pod ...@@ -32,7 +32,7 @@ module Pod
cache_path, tmp_cache = Pathname(Dir.mktmpdir), true unless cache_path cache_path, tmp_cache = Pathname(Dir.mktmpdir), true unless cache_path
cache = Cache.new(cache_path) cache = Cache.new(cache_path)
result = cache.download_pod(request) result = cache.download_pod(request)
if target if target && result.location
UI.message "Copying #{request.name} from `#{result.location}` to #{UI.path target}", '> ' do UI.message "Copying #{request.name} from `#{result.location}` to #{UI.path target}", '> ' do
FileUtils.rm_rf target FileUtils.rm_rf target
FileUtils.cp_r(result.location, target) FileUtils.cp_r(result.location, target)
......
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