From a0b17439f9b43b65893ea071c7350109dd69ccf1 Mon Sep 17 00:00:00 2001 From: Aiden Cline Date: Sat, 3 Jan 2026 00:51:13 -0600 Subject: [PATCH] core: improve plugin loading to handle builtin plugin failures gracefully --- packages/opencode/src/plugin/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/plugin/index.ts b/packages/opencode/src/plugin/index.ts index 9b9d3266a9c..4c42ab972e3 100644 --- a/packages/opencode/src/plugin/index.ts +++ b/packages/opencode/src/plugin/index.ts @@ -39,8 +39,9 @@ export namespace Plugin { const lastAtIndex = plugin.lastIndexOf("@") const pkg = lastAtIndex > 0 ? plugin.substring(0, lastAtIndex) : plugin const version = lastAtIndex > 0 ? plugin.substring(lastAtIndex + 1) : "latest" + const builtin = BUILTIN.some((x) => x.startsWith(pkg + "@")) plugin = await BunProc.install(pkg, version).catch((err) => { - if (BUILTIN.includes(pkg)) return "" + if (builtin) return "" throw err }) if (!plugin) continue