summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2026-01-02 22:54:35 -0800
committerGitHub <[email protected]>2026-01-03 00:54:35 -0600
commitb9b0e3475c285621b399167768e6c80d4ce27bcf (patch)
tree6b927b914671937f0a205c4d7e88db0c41e12b5c /packages
parent77fcefca0e5e28b18ecf008edbd4511a6c35b30a (diff)
downloadopencode-b9b0e3475c285621b399167768e6c80d4ce27bcf.tar.gz
opencode-b9b0e3475c285621b399167768e6c80d4ce27bcf.zip
core: improve plugin loading to handle builtin plugin failures gracefully (#6739)
Diffstat (limited to 'packages')
-rw-r--r--packages/opencode/src/plugin/index.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/opencode/src/plugin/index.ts b/packages/opencode/src/plugin/index.ts
index 9b9d3266a..4c42ab972 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