Skip to content

Commit fdb5326

Browse files
Alb11747codex
andcommitted
test(server): use the host platform for launcher PATH lookup
The test creates native filesystem paths but forced Linux PATH parsing. On Windows that split drive letters at their colon and returned a path without its drive. Use the host platform and matching separator while keeping the existing lookup assertions. Co-Authored-By: GPT-6.1 Sol at high effort <[email protected]> Co-Authored-By: GPT-6.1 Sol at xhigh effort, review subagent for launcher test portability <[email protected]>
1 parent e3b35d1 commit fdb5326

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎apps/server/src/cli/update.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ it.layer(NodeServices.layer)("t3 update launcher", (it) => {
7272
Effect.gen(function* () {
7373
const fs = yield* FileSystem.FileSystem;
7474
const path = yield* Path.Path;
75+
const platform = yield* HostProcess.Platform;
76+
const delimiter = platform === "win32" ? ";" : ":";
7577
const root = yield* fs.makeTempDirectoryScoped({ prefix: "t3-update-" });
7678
const launcher = path.join(root, "bin/t3");
7779
yield* fs.makeDirectory(path.dirname(launcher), { recursive: true });
@@ -80,7 +82,7 @@ it.layer(NodeServices.layer)("t3 update launcher", (it) => {
8082
const bare = yield* resolveLauncherPath.pipe(
8183
Effect.provideService(HostProcess.InvokedAs, "t3"),
8284
Effect.provideService(HostProcess.Environment, {
83-
PATH: `${path.join(root, "missing")}:${path.join(root, "bin")}`,
85+
PATH: [path.join(root, "missing"), path.join(root, "bin")].join(delimiter),
8486
}),
8587
Effect.provideService(HostProcess.WorkingDirectory, root),
8688
);
@@ -98,6 +100,6 @@ it.layer(NodeServices.layer)("t3 update launcher", (it) => {
98100
assert.equal(bare, launcher);
99101
assert.equal(relative, launcher);
100102
assert.equal(absent, undefined);
101-
}).pipe(Effect.scoped, Effect.provideService(HostProcess.Platform, "linux")),
103+
}).pipe(Effect.scoped),
102104
);
103105
});

0 commit comments

Comments
 (0)