Commit 55bb915
committed
ProductUpgrader: copy whole upgrade application
When upgrading VFS for Git via the built-in upgrade logic, the upgrade verb
will copy the upgrader application to a temporary directory, and run the
upgrade app from the temporary directory. The main reason for this is so that
the upgrade application can update the original application without open file
handles getting in the way (and preventing the deletion of the application that
is being updated).
The upgrade verb currently has a hard coded list of dependencies (files)
required for the upgrader application to run. This can be fragile as we need to
keep this list in sync with the actual dependencies, across multiple platforms.
This can easily break if the dependencies change, and we update the list of
files included with the installer, but not with the upgrader application. A
specific occurrence of this happened in microsoft#1144.
Instead, just copy over the whole VFS for Git application directory when
creating a temporary copy of the upgrader application to run. We might copy
over a few additional files, but this should not cause any noticeable
downsides.1 parent d7e55d4 commit 55bb915
1 file changed
Lines changed: 14 additions & 43 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 32 | | |
54 | 33 | | |
55 | 34 | | |
| |||
196 | 175 | | |
197 | 176 | | |
198 | 177 | | |
199 | | - | |
| 178 | + | |
200 | 179 | | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
222 | 193 | | |
223 | 194 | | |
224 | 195 | | |
| |||
0 commit comments