fix(release): Windows CLI smoke test no longer fails on temp dir cleanup (#14553)
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
71a90ae70e
commit
41a8239849
1 file changed
+13
-1
@@ -15,6 +15,7 @@ import * as FileSystem from "effect/FileSystem";
|
||||
import * as Layer from "effect/Layer";
|
||||
import * as Logger from "effect/Logger";
|
||||
import * as Path from "effect/Path";
|
||||
import * as Schedule from "effect/Schedule";
|
||||
import * as Schema from "effect/Schema";
|
||||
import * as Stream from "effect/Stream";
|
||||
import { Command, Flag } from "effect/unstable/cli";
|
||||
@@ -73,7 +74,18 @@ const smokeCliArchive = Effect.fn("smokeCliArchive")(function* (input: {
|
||||
const path = yield* Path.Path;
|
||||
const platform = yield* HostProcessPlatform;
|
||||
const spawner = yield* ChildProcessSpawner.ChildProcessSpawner;
|
||||
const scratch = yield* fs.makeTempDirectoryScoped({ prefix: "t3-cli-smoke-" });
|
||||
const scratch = yield* fs.makeTempDirectory({ prefix: "t3-cli-smoke-" });
|
||||
// Windows can keep t3.exe locked (EBUSY) for a moment after the server
|
||||
// exits. A leftover scratch directory on a CI runner is harmless, so
|
||||
// cleanup retries briefly and never fails a smoke test that passed.
|
||||
yield* Effect.addFinalizer(() =>
|
||||
fs.remove(scratch, { recursive: true }).pipe(
|
||||
Effect.retry({ times: 10, schedule: Schedule.spaced("500 millis") }),
|
||||
Effect.catch((error) =>
|
||||
Effect.logWarning(`[cli-smoke] could not remove ${scratch}: ${error.message}`),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
// On Windows the archive is a zip and the Git Bash `tar` on PATH is GNU
|
||||
// tar; use the bsdtar Windows ships, which reads both formats.
|
||||
|
||||
Reference in new issue
Block a user