Commit a2f265f
Write vendored compact_index files atomically
The completeness check skips the download once every expected file exists,
but File.write truncates before writing, so an install interrupted partway
leaves a half-written file in place. A later run would see it, treat the
vendor tree as complete, and load a truncated source.
Download each file to a sibling .tmp path and rename it into place. The
rename stays within the vendor tree, so it is atomic and a target file is
only ever observed fully written.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0365a17 commit a2f265f
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
| |||
0 commit comments