File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,18 @@ def keep_source_code_for_prebuilt_frameworks!
64
64
65
65
Pod ::UI . puts "🚀 Prebuild frameworks"
66
66
67
+ # Fetch original installer (which is running this pre-install hook) options,
68
+ # then pass them to our installer to perform update if needed
69
+ # Looks like this is the most appropriate way to figure out that something should be updated
70
+
71
+ update = nil
72
+ repo_update = nil
73
+
74
+ include ObjectSpace
75
+ ObjectSpace . each_object ( Pod ::Installer ) { |installer |
76
+ update = installer . update
77
+ repo_update = installer . repo_update
78
+ }
67
79
68
80
# control features
69
81
Pod . is_prebuild_stage = true
@@ -83,11 +95,11 @@ def keep_source_code_for_prebuilt_frameworks!
83
95
lockfile = installer_context . lockfile
84
96
binary_installer = Pod ::Installer . new ( prebuild_sandbox , prebuild_podfile , lockfile )
85
97
86
- if binary_installer . have_exact_prebuild_cache?
98
+ if binary_installer . have_exact_prebuild_cache? && ! update
87
99
binary_installer . install_when_cache_hit!
88
100
else
89
- binary_installer . repo_update = false
90
- binary_installer . update = false
101
+ binary_installer . update = update
102
+ binary_installer . repo_update = repo_update
91
103
binary_installer . install!
92
104
end
93
105
You can’t perform that action at this time.
0 commit comments