Commit 1a1fcee 1 parent b7146a5 commit 1a1fcee Copy full SHA for 1a1fcee
File tree 3 files changed +23
-2
lines changed
lib/cocoapods-core/podfile
3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 11
11
12
12
##### Bug Fixes
13
13
14
- * None.
15
-
14
+ * Fix a crash when using ` inhibit_all_warnings! ` in parent and child scopes
15
+ [ Eric Amorde] ( https://github.com/amorde )
16
+ [ #472 ] ( https://github.com/CocoaPods/Core/issues/472 )
16
17
17
18
## 1.6.0.beta.2 (2018-10-17)
18
19
Original file line number Diff line number Diff line change @@ -893,6 +893,7 @@ def inhibit_warnings_hash
893
893
if inhibit_hash [ 'all' ]
894
894
# Clean pods that are set to not inhibit inside parent if inhibit_all_warnings! was set.
895
895
parent_hash [ 'not_for_pods' ] = nil
896
+ inhibit_hash . delete ( 'all' ) if parent_hash [ 'all' ]
896
897
end
897
898
parent_hash . merge ( inhibit_hash ) do |_ , l , r |
898
899
Array ( l ) . concat ( r ) . uniq
Original file line number Diff line number Diff line change @@ -205,6 +205,25 @@ module Pod
205
205
target = podfile . target_definitions [ 'InheritedLevelTwo' ]
206
206
target . inhibits_warnings_for_pod? ( 'PonyDebugger' ) . should . be . true
207
207
end
208
+
209
+ it 'allows inhibiting all warnings in parent and child scopes' do
210
+ podfile = Podfile . new do
211
+ inhibit_all_warnings!
212
+ target 'App' do
213
+ pod 'PonyDebugger'
214
+ inhibit_all_warnings!
215
+ target 'Inherited' do
216
+ inhibit_all_warnings!
217
+ end
218
+ end
219
+ end
220
+
221
+ target = podfile . target_definitions [ 'App' ]
222
+ target . inhibits_warnings_for_pod? ( 'PonyDebugger' ) . should . be . true
223
+
224
+ target = podfile . target_definitions [ 'Inherited' ]
225
+ target . inhibits_warnings_for_pod? ( 'PonyDebugger' ) . should . be . true
226
+ end
208
227
end
209
228
210
229
describe 'modular headers' do
You can’t perform that action at this time.
0 commit comments