Commit 9135452d authored by Samuel E. Giddins's avatar Samuel E. Giddins

[XCConfigIntegrator] Make the check for xcconfig_includes_target_xcconfig? more concise

parent 2ab324a7
......@@ -150,7 +150,7 @@ module Pod
#
SILENCE_WARNINGS_STRING = '// @COCOAPODS_SILENCE_WARNINGS@ //'
def self.xcconfig_includes_target_xcconfig?(base_config_ref, target_config_path)
return unless base_config_ref && File.exist?(base_config_ref.real_path)
return unless base_config_ref && base_config_ref.real_path.file?
regex = /
^(
(\s* # Possible, but unlikely, space before include statement
......@@ -164,8 +164,7 @@ module Pod
(#{Regexp.quote(SILENCE_WARNINGS_STRING)}) # Token to treat xcconfig as good and silence pod install warnings
)
/x
File.foreach(base_config_ref.real_path) { |line| return true if line =~ regex }
false
base_config_ref.real_path.readlines.find { |line| line =~ regex }
end
end
end
......
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