From 003e45abeda78c77c0c90eaf10d866d2e9e06283 Mon Sep 17 00:00:00 2001 From: Jilaz Date: Tue, 14 Apr 2026 14:53:22 +0300 Subject: [PATCH] fix(auto-update): use semantic version comparison instead of string equality The update checker was using strict string comparison (===) to compare current and latest versions. This caused false-positive update notifications when versions were semantically equal but had different string representations (e.g., with/without 'v' prefix, different formatting). Changed to use compareVersions() which properly parses and compares semver versions, handling 'v' prefixes and other variations correctly. Fixes: incorrect 'v3.17.2 available' notifications when already on latest version --- src/hooks/auto-update-checker/checker/check-for-update.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/auto-update-checker/checker/check-for-update.ts b/src/hooks/auto-update-checker/checker/check-for-update.ts index e315eeed3..bdf2c1ae5 100644 --- a/src/hooks/auto-update-checker/checker/check-for-update.ts +++ b/src/hooks/auto-update-checker/checker/check-for-update.ts @@ -1,4 +1,5 @@ import { log } from "../../../shared/logger" +import { compareVersions } from "../../../shared/opencode-version" import type { UpdateCheckResult } from "../types" import { extractChannel } from "../version-channel" import { isLocalDevMode } from "./local-dev-path" @@ -55,7 +56,7 @@ export async function checkForUpdate(directory: string): Promise