(input: {
readonly lockPath: string;
})
| 269 | | { readonly kind: "attached"; readonly manifest: ExecutorLocalServerManifest }; |
| 270 | |
| 271 | const attachToOwnedDataDirServerOrFail = (input: { |
| 272 | readonly lockPath: string; |
| 273 | }): Effect.Effect<ExecutorLocalServerManifest, Error, FileSystem.FileSystem | PlatformPath.Path> => |
| 274 | Effect.gen(function* () { |
| 275 | const manifest = yield* readReachableLocalServerHint(); |
| 276 | if (manifest) return manifest; |
| 277 | |
| 278 | const path = yield* PlatformPath.Path; |
| 279 | const dataDir = resolveExecutorDataDir(path); |
| 280 | return yield* Effect.fail( |
| 281 | new Error( |
| 282 | [ |
| 283 | "Executor data directory is owned by another live process, but no reachable local server was advertised.", |
| 284 | `Data directory: ${dataDir}`, |
| 285 | `Ownership lock: ${input.lockPath}`, |
| 286 | "Wait for the existing process to finish starting, or stop it and retry.", |
| 287 | ].join("\n"), |
| 288 | ), |
| 289 | ); |
| 290 | }); |
| 291 | |
| 292 | const startServerOrAttachOwnedDataDir = ( |
| 293 | options: StartServerOptions, |
no test coverage detected