Skip to content

Commit e9e0417

Browse files
committed
Fixed update command options passing by inspecting original Pod::Installer (issue leavez#38)
1 parent 2b22adc commit e9e0417

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lib/cocoapods-binary/Main.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ def keep_source_code_for_prebuilt_frameworks!
6464

6565
Pod::UI.puts "🚀 Prebuild frameworks"
6666

67+
# Looks like this is the most appropriate way to figure out that something should be updated
68+
include ObjectSpace
69+
ObjectSpace.each_object(Pod::Installer) { |installer|
70+
@update = installer.update
71+
@repo_update = installer.repo_update
72+
}
6773

6874
# control features
6975
Pod.is_prebuild_stage = true
@@ -82,11 +88,11 @@ def keep_source_code_for_prebuilt_frameworks!
8288
# install
8389
binary_installer = Pod::Installer.new(prebuild_sandbox, prebuild_podfile , nil)
8490

85-
if binary_installer.have_exact_prebuild_cache?
91+
if binary_installer.have_exact_prebuild_cache? && !@update
8692
binary_installer.install_when_cache_hit!
8793
else
88-
binary_installer.repo_update = false
89-
binary_installer.update = false
94+
binary_installer.update = @update
95+
binary_installer.repo_update = @repo_update
9096
binary_installer.install!
9197
end
9298

0 commit comments

Comments
 (0)