Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): launcher preflight and service install explain which t3 ran #13804

ClosedChristian-Schoenlein(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/13804/headopened View on GitHub

Showing 3 changed files with 32 additions and 15 deletions.

x
0 of 3 viewed, 3 left
16 additions and 3 deletionsapps/server/src/cli/service.tsModified
View file
@@ -1,4 +1,9 @@
-import { HostProcessPlatform } from "@t3tools/shared/hostProcess";
+import {
+ HostProcessArguments,
+ HostProcessExecutablePath,
+ HostProcessIsExecutable,
+ HostProcessPlatform,
+} from "@t3tools/shared/hostProcess";
import * as Console from "effect/Console";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
@@ -110,6 +115,12 @@
return yield* run.pipe(Effect.provide(bootServiceLayer(config)));
});
​
+/** The running CLI's path, so a stale `t3` earlier on PATH is visible. */
+const runningCliPath = Effect.gen(function* () {
+ if (yield* HostProcessIsExecutable) return yield* HostProcessExecutablePath;
+ return (yield* HostProcessArguments)[1] ?? (yield* HostProcessExecutablePath);
+});
+​
const serviceReconcileFlags = {
...projectLocationFlags,
allowDowngrade: Flag.Boolean("allow-downgrade").pipe(
@@ -127,7 +138,7 @@
const result = yield* reconcileService({ allowDowngrade: flags.allowDowngrade });
if (!result.changed) {
yield* Console.log(
- `T3 Code service is already installed with t3@${packageJson.version}.`,