fix(desktop): reuse detected SSH platform
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user