Commit 1c9e4b8
committed
fix(json): add retry logic for Windows EPERM errors during file writes
Windows can have transient file locking issues in temp directories, causing
EPERM errors when writing files. This adds exponential backoff retry logic
to handle these transient failures.
- Add retryWrite() helper with exponential backoff (10ms, 20ms, 40ms)
- Retry on EPERM and EBUSY errors up to 3 times
- Fixes flaky test: 'should preserve line endings' on Windows CI1 parent 7a2b6d6 commit 1c9e4b8
1 file changed
+40
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
44 | 82 | | |
45 | 83 | | |
46 | 84 | | |
| |||
216 | 254 | | |
217 | 255 | | |
218 | 256 | | |
219 | | - | |
220 | | - | |
221 | | - | |
| 257 | + | |
| 258 | + | |
222 | 259 | | |
223 | 260 | | |
224 | 261 | | |
| |||
0 commit comments