Skip to content
Source
Sign inSign up
pingdotgg/t3code

test(server): launcher PATH lookup test no longer drops the Windows drive letter #22534

Mergedtris203(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/22534/headmerged by Yash-Singh1(GitHub profile, opens in a new tab) View on GitHub

Showing 1 changed file with 3 additions and 2 deletions.

x
0 of 1 viewed, 1 left
3 additions and 2 deletionsapps/server/src/cli/update.test.tsModified
View file
@@ -136,6 +136,7 @@
Effect.gen(function* () {
const fs = yield* FileSystem.FileSystem;
const path = yield* Path.Path;
+ const delimiter = (yield* HostProcess.Platform) === "win32" ? ";" : ":";
const root = yield* fs.makeTempDirectoryScoped({ prefix: "t3-update-" });
const launcher = path.join(root, "bin/t3");
yield* fs.makeDirectory(path.dirname(launcher), { recursive: true });
@@ -144,7 +145,7 @@
const bare = yield* resolveLauncherPath.pipe(
Effect.provideService(HostProcess.InvokedAs, "t3"),
Effect.provideService(HostProcess.Environment, {
- PATH: `${path.join(root, "missing")}:${path.join(root, "bin")}`,
+ PATH: [path.join(root, "missing"), path.join(root, "bin")].join(delimiter),
}),
Effect.provideService(HostProcess.WorkingDirectory, root),
@@ -162,7 +163,7 @@
assert.equal(bare, launcher);
assert.equal(relative, launcher);
assert.equal(absent, undefined);
- }).pipe(Effect.scoped, Effect.provideService(HostProcess.Platform, "linux")),
+ }).pipe(Effect.scoped),
});
​