mirror of
https://github.com/stablyai/orca.git
synced 2026-09-30 08:03:12 +00:00
* 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>
18 lines
550 B
TypeScript
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()
|
|
}
|
|
}
|