MCPcopy Create free account
hub / github.com/agent-tower/core / resolveCommandParts

Function resolveCommandParts

packages/server/src/executors/command-builder.ts:183–191  ·  view source on GitHub ↗
(
  parts: CommandParts
)

Source from the content-addressed store, hash-verified

181
182/**
183 * 解析命令路径
184 */
185export async function resolveCommandParts(
186 parts: CommandParts
187): Promise<{ programPath: string; args: string[] }> {
188 const programPath = await which(parts.program);
189 if (!programPath) {
190 throw new CommandBuildError(`Executable '${parts.program}' not found in PATH`);
191 }
192 return { programPath, args: parts.args };
193}

Callers 2

spawnInternalFunction · 0.85
spawnWithStdinFunction · 0.85

Calls 1

whichFunction · 0.85

Tested by

no test coverage detected