fix(orcad): move host account env restore out of orcad-entry to clear max-lines (#28529)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Neil
2026-10-13 20:58:38 -07:00
committed by GitHub
co-authored by Claude
parent b9bd8dbe4a
commit ed9ada5fe9
2 changed files with 12 additions and 6 deletions
+2 -6
View File
@@ -291,12 +291,8 @@ async function startOrcadRuntime(
})
// Why before any launch: a desktop that owns this host's accounts pushed them on an earlier run.
const { readOrcadHostAccountLaunchEnv, writeOrcadHostAccountLaunchEnv } =
await import('./orcad-host-account-launch-env-store')
runtime.restoreHostAccountLaunchEnv(
readOrcadHostAccountLaunchEnv(runtimeUserDataPath),
(launchEnv) => writeOrcadHostAccountLaunchEnv(runtimeUserDataPath, launchEnv)
)
const { restoreOrcadHostAccountLaunchEnv } = await import('./orcad-host-account-launch-env-store')
restoreOrcadHostAccountLaunchEnv(runtime, runtimeUserDataPath)
const { installOrcadSessionSearchService } = await import('./orcad-session-search')
sessionSearch = await installOrcadSessionSearchService({
@@ -9,6 +9,7 @@ import {
HostAccountLaunchEnvParams,
type HostAccountLaunchEnv
} from '../../shared/host-account-launch-env'
import type { OrcaRuntimeService } from '../runtime/orca-runtime'
const FILE_NAME = 'host-account-launch-env.json'
@@ -41,3 +42,12 @@ export function writeOrcadHostAccountLaunchEnv(
throw error
}
}
export function restoreOrcadHostAccountLaunchEnv(
runtime: Pick<OrcaRuntimeService, 'restoreHostAccountLaunchEnv'>,
userDataPath: string
): void {
runtime.restoreHostAccountLaunchEnv(readOrcadHostAccountLaunchEnv(userDataPath), (launchEnv) =>
writeOrcadHostAccountLaunchEnv(userDataPath, launchEnv)
)
}