Unverified Commit 80cff930 authored by Dimitris Koutsogiorgas's avatar Dimitris Koutsogiorgas Committed by GitHub

Merge pull request #7193 from dnkoutso/dedup_script_phase_message

Do not display script phases warnings multiple times per platform
parents fcb6a0be 726679b8
......@@ -14,6 +14,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### 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`
[Jon Sorrells](https://github.com/jonsorrells)
[#7176](https://github.com/CocoaPods/CocoaPods/issues/7176)
......
......@@ -530,12 +530,11 @@ module Pod
#
def warn_for_installed_script_phases
pods_to_install = sandbox_state.added | sandbox_state.changed
pod_targets.each do |pod_target|
spec = pod_target.root_spec
if pods_to_install.include?(spec.name)
script_phase_count = pod_target.script_phases.count
pod_targets.group_by(&:pod_name).each do |name, pod_targets|
if pods_to_install.include?(name)
script_phase_count = pod_targets.inject(0) { |sum, target| sum + target.script_phases.count }
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.'
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