Files
orca/src/main/ipc/agent-detection-shell-path.ts
T
OrcaWinandOrcaWin 4d1a3dd6ac Detect installed GitHub CLI behind hung launchers (#25183)
* Recover installed forge CLIs after launcher timeouts

* Preserve healthy CLI timeouts and add native platform checks

* Resolve Windows tree termination outside PATH

* Use native absolute paths in the relative PATH fixture

* Expect the absolute System32 taskkill in tree-kill tests

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-10-08 15:37:25 -07:00

18 lines
651 B
TypeScript

import { hydrateShellPath, mergePathSegments } from '../startup/hydrate-shell-path'
import { getPreflightWslTarget, type PreflightRuntimeContext } from './preflight-runtime-target'
export async function hydrateShellPathForAgentDetection(
context?: PreflightRuntimeContext,
force = false
): Promise<void> {
if (getPreflightWslTarget(context)) {
return
}
// Why: remote runtime servers may inherit a sparse daemon/SSH PATH even
// though the user's shell can run the agents.
const hydration = await (force ? hydrateShellPath({ force: true }) : hydrateShellPath())
if (hydration.ok) {
mergePathSegments(hydration.segments)
}
}