MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / runExtractionCommand

Function runExtractionCommand

apps/kimi-code/src/utils/process/fd-detect.ts:175–182  ·  view source on GitHub ↗
(command: string, args: readonly string[])

Source from the content-addressed store, hash-verified

173}
174
175function runExtractionCommand(command: string, args: readonly string[]): void {
176 const result = spawnSync(command, [...args], { stdio: 'pipe' });
177 if (!result.error && result.status === 0) return;
178 const stderr = result.stderr.toString().trim();
179 const detail =
180 result.error?.message ?? (stderr.length > 0 ? stderr : `exit status ${String(result.status)}`);
181 throw new Error(`Failed to extract fd with ${command}: ${detail}`);
182}
183
184function getWindowsTarCommand(): string {
185 const systemRoot = process.env['SystemRoot'] ?? process.env['WINDIR'];

Callers 1

extractArchiveFunction · 0.85

Calls 1

toStringMethod · 0.65

Tested by

no test coverage detected