Skip to content

The open source coding agent.

TypeScript

fix(config): handle write errors when updating schema in opencode config (#8125)

ShoeBoomc0b214232d88
diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts
index 127406d1d95..bf4a6035bd8 100644
--- a/packages/opencode/src/config/config.ts
+++ b/packages/opencode/src/config/config.ts
@@ -1159,7 +1159,7 @@ export namespace Config {
if (parsed.success) {
if (!parsed.data.$schema) {
parsed.data.$schema = "https://opencode.ai/config.json"
- await Bun.write(configFilepath, JSON.stringify(parsed.data, null, 2))
+ await Bun.write(configFilepath, JSON.stringify(parsed.data, null, 2)).catch(() => {})
}
const data = parsed.data
if (data.plugin) {