Skip to content
3 changes: 2 additions & 1 deletion packages/opencode/src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string> }>(pkg).catch(() => ({
dependencies: {},
Expand Down