mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 08:03:28 +00:00
* fix(wsl): forward ORCA_ROOT_PATH/ORCA_WORKTREE_PATH and setup vars across the wsl.exe boundary (#9206) Worktree setup scripts running under WSL saw empty ORCA_ROOT_PATH / ORCA_WORKTREE_PATH ("cp: cannot stat /.env"): the vars were set on the Windows-side spawn env, but wsl.exe only imports Windows env vars listed in WSLENV, and the addOrcaWslInteropEnv allowlist omitted them. Register ORCA_ROOT_PATH, ORCA_WORKTREE_PATH, and the CONDUCTOR/GHOSTX compat aliases with a per-value flag (same pattern as ORCA_AGENT_HOOK_ENDPOINT): /u when hooks.ts already Linux-translated the value for a WSL worktree (a /p flag would double-translate and corrupt it), /p when a wsl.exe terminal runs over a Windows worktree and the value is still a C:\ path WSLENV must translate. ORCA_WORKSPACE_NAME is a display name, never a path, so it is always /u. * fix(wsl): populate WSLENV for runHook's direct wsl.exe invocations (#9206) runHook spawns wsl.exe via execFile for archive hooks and for setup when no renderer window exists (headless/CLI/RPC/mobile-created worktrees). It set ORCA_ROOT_PATH etc. on the execFile env, but wsl.exe only imports Windows env vars named in WSLENV, so the guest never saw them. Register the setup vars in WSLENV via a helper factored out of the PTY path's addOrcaWslInteropEnv, so the per-value /u-vs-/p flag decision stays in one place. Also make the runHook WSL test assert on captured execFile options after the promise resolves — expects thrown inside the mock were swallowed by runHook's own error handling.