Commit be275692 authored by Gwendal Roué's avatar Gwendal Roué

[#221] robustness against nil file lists (such as public_header_files)

parent 0aea0bef
...@@ -302,6 +302,7 @@ module Pod ...@@ -302,6 +302,7 @@ module Pod
patterns = spec.send(accessor.to_sym) patterns = spec.send(accessor.to_sym)
# Some values are multiplaform # Some values are multiplaform
patterns = patterns.is_a?(Hash) ? patterns.values.flatten(1) : patterns patterns = patterns.is_a?(Hash) ? patterns.values.flatten(1) : patterns
patterns = patterns.compact # some patterns may be nil (public_header_files, for instance)
patterns.each do |pattern| patterns.each do |pattern|
# Skip Filelist that would otherwise be resolved from the working directory resulting # Skip Filelist that would otherwise be resolved from the working directory resulting
# in a potentially very expensi operation # in a potentially very expensi operation
......
...@@ -139,6 +139,7 @@ module Pod ...@@ -139,6 +139,7 @@ module Pod
def expanded_paths(platforms_with_patterns, options = {}) def expanded_paths(platforms_with_patterns, options = {})
patterns = platforms_with_patterns.is_a?(Hash) ? platforms_with_patterns[@platform.name] : platforms_with_patterns patterns = platforms_with_patterns.is_a?(Hash) ? platforms_with_patterns[@platform.name] : platforms_with_patterns
return [] if patterns.nil? # some patterns may be nil (specification.public_header_files, for instance)
patterns.map do |pattern| patterns.map do |pattern|
pattern = root + pattern pattern = root + pattern
......
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