Skip to content

Commit 6378082

Browse files
committed
fix(config): use Cause.pretty for safe config error logging
1 parent 3922a82 commit 6378082

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/opencode/src/config/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import * as Cause from "effect/Cause"
12
import * as Log from "@opencode-ai/core/util/log"
23
import { serviceUse } from "@opencode-ai/core/effect/service-use"
34
import path from "path"
@@ -429,7 +430,7 @@ export const layer = Layer.effect(
429430
}).pipe(
430431
Effect.catchCause((cause) =>
431432
Effect.sync(() => {
432-
log.error("invalid config: config file could not be parsed", { path: source })
433+
log.error("invalid config: config file could not be parsed", { path: source, cause: Cause.pretty(cause) })
433434
return Schema.decodeSync(Info)({})
434435
}),
435436
),

0 commit comments

Comments
 (0)