(filePath: string, description: string)
| 1547 | // A stat() pre-check would add a syscall and a TOCTOU window where |
| 1548 | // concurrent cleanup causes a false-negative return. |
| 1549 | async function tryRemove(filePath: string, description: string) { |
| 1550 | try { |
| 1551 | await unlink(filePath) |
| 1552 | logForDebugging(`Manually removed ${description}: ${filePath}`) |
| 1553 | return true |
| 1554 | } catch { |
| 1555 | return false |
| 1556 | } |
| 1557 | } |
| 1558 | |
| 1559 | if (getPlatform().startsWith('win32')) { |
| 1560 | // Windows - only remove executables, not the package directory |
no test coverage detected