fix(installer): enforce minimum OpenCode version check during install

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-04-08 17:20:00 +09:00
parent 389b194fbf
commit 6d8d82d760
6 changed files with 214 additions and 7 deletions
+14
View File
@@ -0,0 +1,14 @@
import { MIN_OPENCODE_VERSION } from "./doctor/constants"
import { compareVersions } from "../shared/opencode-version"
export function getUnsupportedOpenCodeVersionMessage(openCodeVersion: string | null): string | null {
if (!openCodeVersion) {
return null
}
if (compareVersions(openCodeVersion, MIN_OPENCODE_VERSION) >= 0) {
return null
}
return `Detected OpenCode ${openCodeVersion}, but ${MIN_OPENCODE_VERSION}+ is required. Update OpenCode, then rerun the installer.`
}