(input: {
readonly lockPath: string;
})
| 283 | | { readonly kind: "attached"; readonly manifest: ExecutorLocalServerManifest }; |
| 284 | |
| 285 | const attachToOwnedDataDirServerOrFail = (input: { |
| 286 | readonly lockPath: string; |
| 287 | }): Effect.Effect<ExecutorLocalServerManifest, Error, FileSystem.FileSystem | PlatformPath.Path> => |
| 288 | Effect.gen(function* () { |
| 289 | const manifest = yield* readReachableLocalServerHint(); |
| 290 | if (manifest) return manifest; |
| 291 | |
| 292 | const path = yield* PlatformPath.Path; |
| 293 | const dataDir = resolveExecutorDataDir(path); |
| 294 | return yield* Effect.fail( |
| 295 | new Error( |
| 296 | [ |
| 297 | "Executor data directory is owned by another live process, but no reachable local server was advertised.", |
| 298 | `Data directory: ${dataDir}`, |
| 299 | `Ownership lock: ${input.lockPath}`, |
| 300 | "Wait for the existing process to finish starting, or stop it and retry.", |
| 301 | ].join("\n"), |
| 302 | ), |
| 303 | ); |
| 304 | }); |
| 305 | |
| 306 | const startServerOrAttachOwnedDataDir = ( |
| 307 | options: StartServerOptions, |
no test coverage detected