| ... | ... | @@ -15,6 +15,7 @@ import * as FileSystem from "effect/FileSystem"; |
| 15 | 15 | import * as Layer from "effect/Layer"; |
| 16 | 16 | import * as Logger from "effect/Logger"; |
| 17 | 17 | import * as Path from "effect/Path"; |
| 18 | import * as Schedule from "effect/Schedule"; |
| 18 | 19 | import * as Schema from "effect/Schema"; |
| 19 | 20 | import * as Stream from "effect/Stream"; |
| 20 | 21 | import { Command, Flag } from "effect/unstable/cli"; |
| ... | ... | @@ -73,7 +74,18 @@ const smokeCliArchive = Effect.fn("smokeCliArchive")(function* (input: { |
| 73 | 74 | const path = yield* Path.Path; |
| 74 | 75 | const platform = yield* HostProcessPlatform; |
| 75 | 76 | const spawner = yield* ChildProcessSpawner.ChildProcessSpawner; |
| 76 | | const scratch = yield* fs.makeTempDirectoryScoped({ prefix: "t3-cli-smoke-" }); |
| 77 | const scratch = yield* fs.makeTempDirectory({ prefix: "t3-cli-smoke-" }); |
| 78 | // Windows can keep t3.exe locked (EBUSY) for a moment after the server |
| 79 | // exits. A leftover scratch directory on a CI runner is harmless, so |
| 80 | // cleanup retries briefly and never fails a smoke test that passed. |
| 81 | yield* Effect.addFinalizer(() => |
| 82 | fs.remove(scratch, { recursive: true }).pipe( |
| 83 | Effect.retry({ times: 10, schedule: Schedule.spaced("500 millis") }), |
| 84 | Effect.catch((error) => |
| 85 | Effect.logWarning(`[cli-smoke] could not remove ${scratch}: ${error.message}`), |
| 86 | ), |
| 87 | ), |
| 88 | ); |
| 77 | 89 | |
| 78 | 90 | // On Windows the archive is a zip and the Git Bash `tar` on PATH is GNU |
| 79 | 91 | // tar; use the bsdtar Windows ships, which reads both formats. |