fix(desktop): reuse detected SSH platform

This commit is contained in:
Xipong
2026-09-09 01:19:54 +03:00
committed by Teknium
parent 14a6a75ebe
commit ef677265d2
3 changed files with 10 additions and 2 deletions
+1
View File
@@ -10712,6 +10712,7 @@ async function bootstrapSshConnectionInner(profile, sshConfig, reuseToken, sourc
const lifecycle = platform.os === 'Windows' ? connectWindowsRemote : remoteLifecycle.connect
result = await lifecycle({
ssh,
platform,
profile: resolveRemoteSshDashboardProfile(sshConfig.remoteProfile, profile),
remoteHermesPath: sshConfig.remoteHermesPath || '',
ownershipId: sshOwnershipKey(profile),
@@ -999,7 +999,14 @@ test('connect() spawns fresh when there is no lockfile, adopts the served token'
[/cat .*\.log/, 'HERMES_DASHBOARD_READY port=51999\n']
])
const result = await connect(connectDeps(ssh, { adoptServedToken: async () => 'the-served-token' }))
const result = await connect(
connectDeps(ssh, {
adoptServedToken: async () => 'the-served-token',
platform: { os: 'Linux', arch: 'x86_64' }
})
)
assert.equal(ssh.calls.filter(command => command === 'uname -s; uname -m').length, 0)
assert.equal(result.reused, false)
assert.equal(result.remotePort, 51999)
assert.equal(result.localPort, 50001)
+1 -1
View File
@@ -1396,7 +1396,7 @@ async function connect(deps) {
const log = msg => rememberLog(`[ssh-lifecycle] ${msg}`)
assertBootstrapNotSuperseded(signal)
const platform = await probeRemotePlatform(ssh)
const platform = deps.platform ?? (await probeRemotePlatform(ssh))
log(`remote platform ${platform.os}/${platform.arch}`)
const hermesHome = await probeRemoteHermesHome(ssh)
await assertRemoteInstallUpdateClear(ssh, hermesHome)