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