fix(cli): read OPENCODE_PASSWORD for explicit server auth

This commit is contained in:
Dax Raad 2026-07-03 13:33:25 -04:00
parent aad8d90dd1
commit c6a52a39b5

View file

@ -18,7 +18,7 @@ export default Runtime.handler(Commands, (input) =>
return yield* Effect.fail(new Error("--server and --standalone cannot be combined"))
const transport = yield* Effect.gen(function* () {
if (server !== undefined) {
const password = process.env["OPENCODE_SERVER_PASSWORD"]
const password = process.env["OPENCODE_PASSWORD"]
return {
url: server,
headers: password ? { authorization: "Basic " + btoa("opencode:" + password) } : undefined,