Files
orca/src/main/ipc/agent-detection-shell-path.ts
T
2026-06-23 11:31:41 -07:00

17 lines
588 B
TypeScript

import { hydrateShellPath, mergePathSegments } from '../startup/hydrate-shell-path'
import { getPreflightWslTarget, type PreflightRuntimeContext } from './preflight-runtime-target'
export async function hydrateShellPathForAgentDetection(
context?: PreflightRuntimeContext
): 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 hydrateShellPath()
if (hydration.ok) {
mergePathSegments(hydration.segments)
}
}