Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[ExternalSources] Robustness.

  • Loading branch information...
commit 6624bfc8c633d3efca7d1858c78d977b8e3f4899 1 parent dca782c
@fabiopelosin fabiopelosin authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/cocoapods/dependency.rb
View
8 lib/cocoapods/dependency.rb
@@ -204,7 +204,7 @@ def copy_external_source_into_sandbox(sandbox, _)
output_path = sandbox.root + "Local Podspecs/#{name}.podspec"
output_path.dirname.mkpath
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 }
end
end
@@ -216,9 +216,9 @@ def description
class LocalSource < AbstractExternalSource
def pod_spec_path
- root = Pathname.new(@params[:local])
- path = spec_path = Dir[root + "*.podspec"].first
- Pathname.new(path)
+ path = Pathname.new(@params[:local]).expand_path + "#{name}.podspec"
+ raise Informative, "No podspec found for `#{name}` in #{description}" unless path.exist?
+ path
end
def copy_external_source_into_sandbox(sandbox, _)
Please sign in to comment.
Something went wrong with that request. Please try again.