Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

Attempt a fix for #323 #345

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Attempt a fix for #323 #345

wants to merge 1 commit into from

Conversation

orta
Copy link
Member

@orta orta commented Jun 4, 2016

I really am grasping at straws here WRT the launch crasher #323

    reflector.allCocoaPodsSources { sources, error in
>      let unordered_sources =  sources.map { CPSourceRepo(name: $0.0, address: $0.1) }
      self.allRepos = unordered_sources.sort(self.cocoaPodsSpecSort)

This line crashes, which can only really happen if there isn't both strings in the dictionary as keys and values.

@@ -88,7 +88,7 @@ def self.pod_sources
sources_manager.all.map { |source|
{ source.name => source.url }

}.reduce &:merge
}.reduce(&:merge).select { |key, value| key.is_a?(String) && value.is_a?(String) }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing all you have to do here is change this to reduce({}, &:merge) -- if there are no sources, it'll return nil as-is

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants