mirror of
https://github.com/stablyai/orca.git
synced 2026-10-17 16:02:55 +00:00
Recover working local forge CLIs behind broken PATH launchers
Recover a working local forge CLI when an earlier PATH launcher is broken. Bound executable probes and reuse the verified selection for native operations without replaying authentication or user requests. Fixes #22975 Co-authored-by: Aashish <145881415+aashish254@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import { execFile, type ChildProcess, type ExecFileOptions } from 'node:child_pr
|
||||
import { recordSubprocessSpawn } from '../../diagnostics/main-thread-churn-probe'
|
||||
import { endSubprocessStdin } from '../../../shared/subprocess-stdin-write'
|
||||
import { runProcess } from '../../../shared/child-process/run-process'
|
||||
import { resolveSelectedLocalCommand } from '../../ipc/command-path-resolver'
|
||||
import type { WslProcessGroupTermination } from '../wsl-process-group-termination'
|
||||
import { createAbortError } from './abort-error'
|
||||
import { killSpawnedCommandTree } from './spawned-command-tree-kill'
|
||||
@@ -30,7 +31,10 @@ export async function execFileCaptureToTermination(
|
||||
// Spawn cost is reported by spawnProcess's observer, which runProcess goes
|
||||
// through; recording it again here would double-count every capture.
|
||||
const pending = runProcess({
|
||||
program: command,
|
||||
program: resolveSelectedLocalCommand(command, {
|
||||
env: options.env,
|
||||
cwd: typeof options.cwd === 'string' ? options.cwd : undefined
|
||||
}),
|
||||
args,
|
||||
cwd: typeof options.cwd === 'string' ? options.cwd : undefined,
|
||||
env: options.env,
|
||||
|
||||
Reference in New Issue
Block a user