Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(install): launch t3 by absolute path #13794

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 9 commits intomain fromrefs/pull/13794/headmerged by juliusmarminge View on GitHub

Showing 15 changed files with 40 additions and 36 deletions (loading 12).

x
0 of 15 viewed, 15 left
13 additions and 17 deletionsapps/server/src/cli/install.test.tsModified
View file
@@ -9,6 +9,7 @@
import * as TestClock from "effect/testing/TestClock";
​
import packageJson from "../../package.json" with { type: "json" };
+import { posixLauncherScript } from "../cloud/pinnedRuntime.ts";
import { installCli, isForegroundProcStat, isForegroundPs, offerCliInstall } from "./install.ts";
​
const VERSION = packageJson.version;
@@ -47,7 +48,7 @@
});
​
it.layer(NodeServices.layer)("t3 install", (it) => {
- it.effect("links the running runtime, records it, and never replaces another t3", () =>
+ it.effect("installs the running runtime, records it, and never replaces another t3", () =>
Effect.gen(function* () {
const fs = yield* FileSystem.FileSystem;
const path = yield* Path.Path;
@@ -57,7 +58,7 @@
yield* fs.makeDirectory(path.dirname(link), { recursive: true });
yield* fs.symlink(older, link);
const installed = yield* provide(installCli());
- assert.equal(yield* fs.readLink(link), executable);
+ assert.equal(yield* fs.readFileString(link), posixLauncherScript(executable));
assert.isFalse(installed.onPath);
assert.include(installed.pathCommand, "$HOME/bin");
​
@@ -96,30 +97,25 @@