fix(auto-update): support prerelease versions without numeric suffix in fallback

This commit is contained in:
YeonGyu-Kim
2026-02-21 04:10:27 +09:00
parent 88148fe248
commit f260d15632

View File

@@ -4,7 +4,7 @@ const PACKAGE_NAME = "oh-my-opencode"
const PRIORITIZED_TAGS = ["latest", "beta", "next"] as const
function getFallbackEntry(version: string): string {
const prereleaseMatch = version.match(/-([a-zA-Z][a-zA-Z0-9]*)\./)
const prereleaseMatch = version.match(/-([a-zA-Z][a-zA-Z0-9-]*)(?:\.|$)/)
if (prereleaseMatch) {
return `${PACKAGE_NAME}@${prereleaseMatch[1]}`
}