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:
@@ -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.`
|
||||
}
|
||||
Reference in New Issue
Block a user