diff --git a/packages/opencode/src/config/config.ts b/packages/opencode/src/config/config.ts index 28aea4d6777..ff74799fd7a 100644 --- a/packages/opencode/src/config/config.ts +++ b/packages/opencode/src/config/config.ts @@ -246,7 +246,8 @@ export namespace Config { export async function installDependencies(dir: string) { const pkg = path.join(dir, "package.json") - const targetVersion = Installation.isLocal() ? "*" : Installation.VERSION + const isValidSemVer = /^\d+\.\d+\.\d+/.test(Installation.VERSION) + const targetVersion = Installation.isLocal() || !isValidSemVer ? "*" : Installation.VERSION const json = await Filesystem.readJson<{ dependencies?: Record }>(pkg).catch(() => ({ dependencies: {},