chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-21 19:19:25 +00:00
parent 231689c767
commit 9ecb04e35b

View File

@@ -126,10 +126,7 @@ function withProcessEnv<A, E, R>(key: string, value: string | undefined, effect:
return withProcessEnvs({ [key]: value }, effect) return withProcessEnvs({ [key]: value }, effect)
} }
function withProcessEnvs<A, E, R>( function withProcessEnvs<A, E, R>(entries: Record<string, string | undefined>, effect: Effect.Effect<A, E, R>) {
entries: Record<string, string | undefined>,
effect: Effect.Effect<A, E, R>,
) {
return Effect.acquireUseRelease( return Effect.acquireUseRelease(
Effect.sync(() => { Effect.sync(() => {
const originals: Record<string, string | undefined> = {} const originals: Record<string, string | undefined> = {}
@@ -1960,17 +1957,19 @@ describe("OPENCODE_DISABLE_PROJECT_CONFIG", () => {
{ config: { instructions: ["./CUSTOM.md"] } }, { config: { instructions: ["./CUSTOM.md"] } },
) )
it.instance("OPENCODE_CONFIG_DIR still works when flag is set", () => it.instance(
Effect.gen(function* () { "OPENCODE_CONFIG_DIR still works when flag is set",
const configDir = yield* tmpdirScoped({ config: { model: "configdir/model" } }) () =>
yield* withProcessEnvs( Effect.gen(function* () {
{ OPENCODE_DISABLE_PROJECT_CONFIG: "true", OPENCODE_CONFIG_DIR: configDir }, const configDir = yield* tmpdirScoped({ config: { model: "configdir/model" } })
Effect.gen(function* () { yield* withProcessEnvs(
const config = yield* Config.use.get() { OPENCODE_DISABLE_PROJECT_CONFIG: "true", OPENCODE_CONFIG_DIR: configDir },
expect(config.model).toBe("configdir/model") Effect.gen(function* () {
}), const config = yield* Config.use.get()
) expect(config.model).toBe("configdir/model")
}), }),
)
}),
{ config: { model: "project/model" } }, { config: { model: "project/model" } },
) )
}) })