(projectRoot: string)
| 771 | } |
| 772 | |
| 773 | function removeIsolatedRoot(projectRoot: string): void { |
| 774 | try { |
| 775 | fs.rmSync(projectRoot, { |
| 776 | recursive: true, |
| 777 | force: true, |
| 778 | maxRetries: process.platform === "win32" ? 20 : 3, |
| 779 | retryDelay: 100, |
| 780 | }); |
| 781 | } catch (error) { |
| 782 | if (process.platform === "win32" && isWindowsTransientRemoveError(error)) { |
| 783 | console.warn( |
| 784 | `Unable to remove isolated SimDeck test project ${projectRoot}: ${ |
| 785 | error instanceof Error ? error.message : String(error) |
| 786 | }`, |
| 787 | ); |
| 788 | return; |
| 789 | } |
| 790 | throw error; |
| 791 | } |
| 792 | } |
| 793 | |
| 794 | function isWindowsTransientRemoveError(error: unknown): boolean { |
| 795 | if (!error || typeof error !== "object") { |
no test coverage detected