{"record":{"id":"48877b9bae574aae","repo":"ruvnet/ruflo","slug":"tar-extraction-failed-exit-result-exitcode","errorCode":null,"errorMessage":"tar extraction failed (exit ${result.exitCode}): ${result.stderr || result.stdout}","messagePattern":"tar extraction failed \\(exit (.+?)\\): (.+?)","errorType":"exception","errorClass":"ExtractionError","httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/cli/src/proxy/install.ts","lineNumber":36,"sourceCode":"\nexport class ExtractionError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = 'ExtractionError';\n  }\n}\n\nfunction binaryNameInArchive(): string {\n  return process.platform === 'win32' ? 'meta-proxy.exe' : 'meta-proxy';\n}\n\n/** `tar` handles `.tar.gz` everywhere, and `.zip` via bsdtar on Windows 10+. */\nasync function extractWithTar(archivePath: string, extractDir: string, flags: 'xzf' | 'xf'): Promise<void> {\n  const { SafeExecutor } = await import('@claude-flow/security');\n  const exec = new SafeExecutor({ allowedCommands: ['tar'], timeout: 60_000 });\n  const result = await exec.execute('tar', [flags, archivePath, '-C', extractDir]);\n  if (result.exitCode !== 0) {\n    throw new ExtractionError(`tar extraction failed (exit ${result.exitCode}): ${result.stderr || result.stdout}`);\n  }\n}\n\n/**\n * Single-quoted literal paths (doubling any embedded single quote per\n * PowerShell string-literal escaping) passed as ONE argv element to\n * `-Command`. shell:false means no OS shell ever tokenizes this string —\n * only powershell.exe's own parser does.\n */\nasync function extractWithPowerShell(archivePath: string, extractDir: string): Promise<void> {\n  const { SafeExecutor } = await import('@claude-flow/security');\n  const escape = (p: string) => p.replace(/'/g, \"''\");\n  const command = `Expand-Archive -LiteralPath '${escape(archivePath)}' -DestinationPath '${escape(extractDir)}' -Force`;\n  const exec = new SafeExecutor({ allowedCommands: ['powershell', 'powershell.exe'], timeout: 60_000 });\n  const result = await exec.execute('powershell', ['-NoProfile', '-NonInteractive', '-Command', command]);\n  if (result.exitCode !== 0) {\n    throw new ExtractionError(`Expand-Archive failed (exit ${result.exitCode}): ${result.stderr || result.stdout}`);\n  }","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/ruvnet/ruflo/blob/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/v3/@claude-flow/cli/src/proxy/install.ts#L18-L54","documentation":"Error \"tar extraction failed (exit ${result.exitCode}): ${result.stderr || result.stdout}\" thrown in ruvnet/ruflo.","triggerScenarios":"Thrown at v3/@claude-flow/cli/src/proxy/install.ts:36 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6b01dc5a687b26b3e218f796de45ec51f8fa9e8c","analyzedAt":"2026-08-12T13:20:50.148Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}