Files
orca/src/shared/local-agent-install-dir-detection.ts
Jinwoo HongandOrcaWin 8f7692aa12 Fix packaged skills CLI runtime ownership (#11627)
* fix(cli): make packaged skills runtime self-contained

* fix(cli): address packaged skills review feedback

* ci(cli): smoke packaged skills on Windows

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
2026-07-30 18:27:16 -07:00

18 lines
550 B
TypeScript

import path from 'node:path'
import { resolveCliCommands } from './node-cli-command-resolution'
// Why: detection may precede shell-PATH hydration, but the fallback stays bounded.
export function detectCommandsInInstallDirs(commands: readonly string[]): Set<string> {
if (commands.length === 0) {
return new Set()
}
try {
const resolvedCommands = resolveCliCommands(commands)
return new Set(
commands.filter((command) => path.isAbsolute(resolvedCommands.get(command) ?? command))
)
} catch {
return new Set()
}
}