Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): detect inherited bootstrap pipes on Windows #34384

Openfreddy-d(GitHub profile, opens in a new tab)wants to merge 9 commits intomain fromrefs/pull/34384/headopened View on GitHub

Showing 4 changed files with 164 additions and 11 deletions (loading 1).

x
0 of 4 viewed, 4 left
32 additions and 0 deletionsapps/server/src/cli/config.test.tsModified
View file
@@ -32,6 +32,7 @@
SERVICE_LAUNCHER_CONTEXT_ENV,
SERVICE_LAUNCHER_PROTOCOL,
} from "../cloud/serviceProtocol.ts";
+import { BootstrapFdStatError } from "../bootstrap.ts";
import { deriveServerPaths } from "../config.ts";
import * as ProcessRunner from "../processRunner.ts";
import { acquireServerOwnership } from "../serverOwnership.ts";
@@ -890,6 +891,37 @@
lan: Option.none<boolean>(),
});
​
+ it.effect("rejects an unavailable bootstrap fd before creating server state", () =>
+ Effect.gen(function* () {
+ const fs = yield* FileSystem.FileSystem;
+ const path = yield* Path.Path;
+ const root = yield* fs.makeTempDirectoryScoped({ prefix: "t3-cli-bootstrap-required-" });
+ const baseDir = path.join(root, "server-home");
+ const fd = 2_147_483_647;
+​
+ const error = yield* resolveServerConfig(
+ {
+ ...minimalWebFlags(baseDir),
+ mode: Option.none(),
+ bootstrapFd: Option.some(fd),
+ },
+ Option.none(),
+ ).pipe(
+ Effect.provide(