( parts: CommandParts )
| 181 | |
| 182 | /** |
| 183 | * 解析命令路径 |
| 184 | */ |
| 185 | export 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 | } |
no test coverage detected