Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): updates no longer keep every old runtime on disk #22253

Mergedjuliusmarmingemerged 8 commits intomain fromrefs/pull/22253/headmerged by juliusmarminge View on GitHub

Showing 10 changed files with 40 additions and 14 deletions (loading 7).

x
0 of 10 viewed, 10 left
7 additions and 3 deletionsapps/server/src/cli/uninstall.tsModified
View file
@@ -14,10 +14,14 @@
import { Command, Flag, GlobalFlag, Prompt } from "effect/cli";
​
import * as BootService from "../cloud/bootService.ts";
-import { pinnedRuntimeVersionsDir } from "../cloud/pinnedRuntime.ts";
+import {
+ launcherOwnsVersionsDir,
+ pinnedRuntimeVersionsDir,
+ windowsShimTarget,
+} from "../cloud/pinnedRuntime.ts";
import { projectLocationFlags, resolveCliAuthConfig } from "./config.ts";
import * as CliService from "./service.ts";
-import { findWindowsShim, launcherOwnsVersionsDir, resolveLauncherPath } from "./update.ts";
+import { findWindowsShim, resolveLauncherPath } from "./update.ts";
​
export class CliUninstallError extends Schema.TaggedError<CliUninstallError>()(
"CliUninstallError",
@@ -51,7 +55,7 @@
const shimPath = yield* findWindowsShim(input.launchedAs);
if (shimPath === undefined) return undefined;
const contents = yield* fs.readFileString(shimPath).pipe(Effect.option);
- const target = Option.isSome(contents) ? /^"([^"]+)"/m.exec(contents.value)?.[1] : undefined;
+ const target = Option.isSome(contents) ? windowsShimTarget(contents.value) : undefined;
return target !== undefined && launcherOwnsVersionsDir(path, input.versionsDir, target)
? shimPath
: undefined;
16 additions and 11 deletionsapps/server/src/cli/update.tsModified
View file