Commit 9bc7d38
Fix silent tar extraction failure on EdenFS in replace-rncore-version (facebook#55797)
Summary:
On EdenFS, `tar -xf` extraction directly into an EdenFS-mounted directory silently produces incomplete results — only the first slice of the tarball (ios-arm64) gets extracted, while the remaining entries (catalyst, simulator, top-level Headers) have their directories created but files are missing. The `replace-rncore-version.js` script didn't check tar's exit code, so it would write the config file and subsequent builds would skip re-extraction.
This fix extracts the tarball to a temporary directory on a regular filesystem first, verifies the extraction succeeded (exit code + expected file check), then moves the results into the final location. This is adapted from D94625297 (which targeted 0.83) to work with the current main branch, preserving the v0.84 behavior of only deleting subdirectories in `React-Core-prebuilt` (keeping files like `React-VFS.yaml`).
## Changelog:
[IOS] [FIXED] - Fix silent tar extraction failure on EdenFS in replace-rncore-version.js by extracting to a temp directory first
Pull Request resolved: facebook#55797
Test Plan: Validated by the original patch author on EdenFS in D94625297. The logic is equivalent, adapted for the v0.84 code which preserves files in the target directory.
Reviewed By: cortinico
Differential Revision: D94653392
Pulled By: cipolleschi
fbshipit-source-id: f2f1956b434586f0a83e1ec648a03dbac25333f51 parent fdd1f6e commit 9bc7d38
1 file changed
+72
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
77 | 89 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
82 | 139 | | |
83 | 140 | | |
84 | 141 | | |
| |||
0 commit comments