Commit 6624bfc8 authored by Fabio Pelosin's avatar Fabio Pelosin

[ExternalSources] Robustness.

parent dca782c3
...@@ -204,7 +204,7 @@ module Pod ...@@ -204,7 +204,7 @@ module Pod
output_path = sandbox.root + "Local Podspecs/#{name}.podspec" output_path = sandbox.root + "Local Podspecs/#{name}.podspec"
output_path.dirname.mkpath output_path.dirname.mkpath
puts "-> Fetching podspec for `#{name}' from: #{@params[:podspec]}" unless config.silent? puts "-> Fetching podspec for `#{name}' from: #{@params[:podspec]}" unless config.silent?
open(@params[:podspec]) do |io| open(Pathname.new(@params[:podspec]).expand_path) do |io|
output_path.open('w') { |f| f << io.read } output_path.open('w') { |f| f << io.read }
end end
end end
...@@ -216,9 +216,9 @@ module Pod ...@@ -216,9 +216,9 @@ module Pod
class LocalSource < AbstractExternalSource class LocalSource < AbstractExternalSource
def pod_spec_path def pod_spec_path
root = Pathname.new(@params[:local]) path = Pathname.new(@params[:local]).expand_path + "#{name}.podspec"
path = spec_path = Dir[root + "*.podspec"].first raise Informative, "No podspec found for `#{name}` in #{description}" unless path.exist?
Pathname.new(path) path
end end
def copy_external_source_into_sandbox(sandbox, _) def copy_external_source_into_sandbox(sandbox, _)
......
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