fix: tighten server update check handling (#694)

Refine server update-check flow in runtime endpoints
Improve package-manager update detection consistency
This commit is contained in:
Bohdan Triapitsyn
2026-03-17 13:25:55 +02:00
committed by GitHub
parent 3123de5f43
commit 74ef18dd4f
2 changed files with 8 additions and 19 deletions
+6 -2
View File
@@ -86,11 +86,15 @@ function normalizeArch(value) {
async function checkForUpdatesFromApi(currentVersion, options = {}) {
try {
const appType = normalizeAppType(options.appType);
const hostPlatform = mapPlatform(process.platform);
const hostArch = mapArch(process.arch);
const platform = appType === 'vscode' ? normalizePlatform(options.platform) : hostPlatform;
const arch = appType === 'vscode' ? normalizeArch(options.arch) : hostArch;
const payload = {
appType,
deviceClass: normalizeDeviceClass(options.deviceClass),
platform: normalizePlatform(options.platform),
arch: normalizeArch(options.arch),
platform,
arch,
channel: 'stable',
currentVersion,
installId: getOrCreateInstallId(appType),