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";...@@ -15,6 +15,7 @@ import * as FileSystem from "effect/FileSystem";
15import * as Layer from "effect/Layer";15import * as Layer from "effect/Layer";
16import * as Logger from "effect/Logger";16import * as Logger from "effect/Logger";
17import * as Path from "effect/Path";17import * as Path from "effect/Path";
18import * as Schedule from "effect/Schedule";
18import * as Schema from "effect/Schema";19import * as Schema from "effect/Schema";
19import * as Stream from "effect/Stream";20import * as Stream from "effect/Stream";
20import { Command, Flag } from "effect/unstable/cli";21import { Command, Flag } from "effect/unstable/cli";
...@@ -73,7 +74,18 @@ const smokeCliArchive = Effect.fn("smokeCliArchive")(function* (input: {...@@ -73,7 +74,18 @@ const smokeCliArchive = Effect.fn("smokeCliArchive")(function* (input: {
73 const path = yield* Path.Path;74 const path = yield* Path.Path;
74 const platform = yield* HostProcessPlatform;75 const platform = yield* HostProcessPlatform;
75 const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;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 );
7789
78 // On Windows the archive is a zip and the Git Bash `tar` on PATH is GNU90 // On Windows the archive is a zip and the Git Bash `tar` on PATH is GNU
79 // tar; use the bsdtar Windows ships, which reads both formats.91 // tar; use the bsdtar Windows ships, which reads both formats.