authorgravatar for me@t3.ggTheo Browne <me@t3.gg> 2026-10-01 00:01:39-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-01 00:01:39-07:00
log41a8239849d7e6523c08edb363efdeccfb150be5
treeae2f1fa3acbf5e2fa3445c81ba49c27988c45e16
parent71a90ae70e3ff880396363809bd9bfcfd520f30c
signature Signed by PGP key B5690EEEBB952194

fix(release): Windows CLI smoke test no longer fails on temp dir cleanup (#14553)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

1 files changed, 13 insertions(+), 1 deletions(-)

scripts/smoke-cli-archive.ts+13-1
......@@ -15,6 +15,7 @@ import * as FileSystem from "effect/FileSystem";
1515import * as Layer from "effect/Layer";
1616import * as Logger from "effect/Logger";
1717import * as Path from "effect/Path";
18import * as Schedule from "effect/Schedule";
1819import * as Schema from "effect/Schema";
1920import * as Stream from "effect/Stream";
2021import { Command, Flag } from "effect/unstable/cli";
......@@ -73,7 +74,18 @@ const smokeCliArchive = Effect.fn("smokeCliArchive")(function* (input: {
7374 const path = yield* Path.Path;
7475 const platform = yield* HostProcessPlatform;
7576 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 );
7789
7890 // On Windows the archive is a zip and the Git Bash `tar` on PATH is GNU
7991 // tar; use the bsdtar Windows ships, which reads both formats.