cli/mini: fix run failure handling (#35539)

This commit is contained in:
Simon Klee 2026-07-06 12:34:44 +02:00 committed by GitHub
commit 0bba8c780a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 152 additions and 50 deletions

View file

@ -42,7 +42,7 @@ const makeTransport = Effect.fn("cli.standalone.transport")(
const output = yield* proc.stdout.pipe(Stream.decodeText(), Stream.splitLines, Stream.take(1), Stream.mkString)
if (!output) return yield* Effect.fail(new Error("Standalone server exited before reporting readiness"))
const ready = yield* Effect.tryPromise(() => decodeReady(output))
return { url: ready.url, headers: ServerAuth.headers({ password }), pid: proc.pid }
return { url: ready.url, headers: ServerAuth.headers({ password, username: "opencode" }), pid: proc.pid }
},
Effect.provide(AppNodeBuilder.build(CrossSpawnSpawner.node)),
)