Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): stop npx service updates from silently leaving the old server running #5217

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5217/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 2 changed files with 22 additions and 15 deletions.

x
0 of 2 viewed, 2 left
17 additions and 2 deletionsapps/server/src/cloud/bootService.test.tsModified
View file
@@ -33,6 +33,7 @@
​
const makeHarness = Effect.fn("test.make_boot_service_harness")(function* (
platform: NodeJS.Platform = "linux",
+ usePinnedLauncher = false,
) {
const fs = yield* FileSystem.FileSystem;
const path = yield* Path.Path;
@@ -44,6 +45,10 @@
const runtime = pinnedRuntimePaths(path, baseDir, "1.2.3");
yield* fs.makeDirectory(path.dirname(runtime.entryPath), { recursive: true });
yield* fs.writeFileString(runtime.entryPath, "export {};\n");
+ yield* fs.writeFileString(
+ path.join(path.dirname(runtime.entryPath), "service-launcher.mjs"),
+ "export const source = 'pinned runtime';\n",
+ );
yield* fs.writeFileString(runtime.sentinelPath, "1.2.3\n");
​
const commands: string[] = [];
@@ -69,8 +74,7 @@
cliVersion: "1.2.3",
host: {
execPath: "/usr/bin/node",
- cliEntryPath: path.join(home, "bin.mjs"),
- launcherSourcePath: sourceLauncher,
+ ...(usePinnedLauncher ? {} : { launcherSourcePath: sourceLauncher }),
},
}).pipe(