Do not display script phases warnings multiple times per platform

parent fcb6a0be
...@@ -14,6 +14,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre` ...@@ -14,6 +14,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes ##### Bug Fixes
* Do not display script phases warnings multiple times per platform
[Dimitris Koutsogiorgas](https://github.com/dnkoutso)
[#7193](https://github.com/CocoaPods/CocoaPods/pull/7193)
* Prevent passing empty string to git when running `pod repo update --silent` * Prevent passing empty string to git when running `pod repo update --silent`
[Jon Sorrells](https://github.com/jonsorrells) [Jon Sorrells](https://github.com/jonsorrells)
[#7176](https://github.com/CocoaPods/CocoaPods/issues/7176) [#7176](https://github.com/CocoaPods/CocoaPods/issues/7176)
......
...@@ -530,12 +530,11 @@ module Pod ...@@ -530,12 +530,11 @@ module Pod
# #
def warn_for_installed_script_phases def warn_for_installed_script_phases
pods_to_install = sandbox_state.added | sandbox_state.changed pods_to_install = sandbox_state.added | sandbox_state.changed
pod_targets.each do |pod_target| pod_targets.group_by(&:pod_name).each do |name, pod_targets|
spec = pod_target.root_spec if pods_to_install.include?(name)
if pods_to_install.include?(spec.name) script_phase_count = pod_targets.inject(0) { |sum, target| sum + target.script_phases.count }
script_phase_count = pod_target.script_phases.count
unless script_phase_count.zero? unless script_phase_count.zero?
UI.warn "#{spec.name} has added #{pod_target.script_phases.count} #{'script phase'.pluralize(script_phase_count)}. " \ UI.warn "#{name} has added #{script_phase_count} #{'script phase'.pluralize(script_phase_count)}. " \
'Please inspect before executing a build. See `https://guides.cocoapods.org/syntax/podspec.html#script_phases` for more information.' 'Please inspect before executing a build. See `https://guides.cocoapods.org/syntax/podspec.html#script_phases` for more information.'
end 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