Skip to content

Commit f990452

Browse files
committed
fix crash
1 parent 4ae63dc commit f990452

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lib/cocoapods-binary/helper/feature_switches.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ def self.enable_prebuild_patch(value)
3838
end
3939

4040
if should_prebuild and (not local)
41-
platform = current_target_definition.platform
42-
if !platform.nil? and platform.name == :watchos
41+
if current_target_definition.platform == :watchos
4342
# watchos isn't supported currently
4443
Pod::UI.warn "Binary doesn't support watchos currently: #{name}. You can manually set `binary => false` for this pod to suppress this warning."
4544
return

lib/cocoapods-binary/helper/podfile_options.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def set_prebuild_for_pod(pod_name, should_prebuild)
2424

2525
if should_prebuild == true
2626
# watchos isn't supported currently
27-
return if self.platform.name == :watchos
27+
return if self.platform == :watchos
2828

2929
@prebuild_framework_names ||= []
3030
@prebuild_framework_names.push pod_name
@@ -71,7 +71,7 @@ def prebuild_pod_targets
7171

7272
all = []
7373

74-
aggregate_targets = self.aggregate_targets.select { |a| a.platform.name != :watchos }
74+
aggregate_targets = self.aggregate_targets.select { |a| a.platform != :watchos }
7575
aggregate_targets.each do |aggregate_target|
7676
target_definition = aggregate_target.target_definition
7777
targets = aggregate_target.pod_targets || []

0 commit comments

Comments
 (0)