Skip to content

Commit 702f502

Browse files
committed
fix save_pod_name_for_target
1 parent 01430ed commit 702f502

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/cocoapods-binary/Prebuild.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ def prebuild_frameworks!
130130
Prebuild::Passer.resources_to_copy_for_static_framework[target.name] = path_objects
131131
end
132132

133-
# save the pod_name for prebuild framwork in sandbox
134-
sandbox.save_pod_name_for_target target
135133
end
136134
Pod::Prebuild.remove_build_dir(sandbox_path)
137135

@@ -162,6 +160,11 @@ def prebuild_frameworks!
162160
end
163161
end
164162
end
163+
164+
# save the pod_name for prebuild framwork in sandbox
165+
targets.each do |target|
166+
sandbox.save_pod_name_for_target target
167+
end
165168

166169
# Remove useless files
167170
# remove useless pods

lib/cocoapods-binary/helper/prebuild_sandbox.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def existed_target_names_for_pod_name(pod_name)
4242

4343
def save_pod_name_for_target(target)
4444
folder = framework_folder_path_for_target_name(target.name)
45+
return unless folder.exist?
4546
flag_file_path = folder + "#{target.pod_name}.pod_name"
4647
File.write(flag_file_path.to_s, "")
4748
end

0 commit comments

Comments
 (0)