{"record":{"id":"ed0e07e505263eeb","repo":"Kuberwastaken/claurst","slug":"tar-xf-returned-non-zero-exit-status","errorCode":null,"errorMessage":"tar -xf returned non-zero exit status: {}","messagePattern":"tar -xf returned non-zero exit status: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-rust/crates/cli/src/upgrade.rs","lineNumber":253,"sourceCode":"                &format!(\n                    \"Expand-Archive -Path '{}' -DestinationPath '{}' -Force\",\n                    archive.display(),\n                    dest.display()\n                ),\n            ])\n            .status();\n        if let Ok(s) = ps_status {\n            if s.success() {\n                return Ok(());\n            }\n        }\n        // tar -xf works on Windows 10+ via bsdtar.\n        let status = std::process::Command::new(\"tar\")\n            .args([\"-xf\", &archive.to_string_lossy(), \"-C\", &dest.to_string_lossy()])\n            .status()\n            .context(\"failed to spawn tar\")?;\n        if !status.success() {\n            bail!(\"tar -xf returned non-zero exit status: {}\", status);\n        }\n        Ok(())\n    } else {\n        let status = std::process::Command::new(\"tar\")\n            .args([\"-xzf\", &archive.to_string_lossy(), \"-C\", &dest.to_string_lossy()])\n            .status()\n            .context(\"failed to spawn tar\")?;\n        if !status.success() {\n            bail!(\"tar -xzf returned non-zero exit status: {}\", status);\n        }\n        Ok(())\n    }\n}\n\n// Shallow walker (avoids pulling walkdir crate just for this).\nfn walkdir_shallow(root: &Path, max_depth: usize) -> Vec<PathBuf> {\n    fn rec(dir: &Path, depth_left: usize, out: &mut Vec<PathBuf>) {\n        if depth_left == 0 {","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/Kuberwastaken/claurst/blob/b0637c97ec34144387cbf2f74f65df6d16a6cef1/src-rust/crates/cli/src/upgrade.rs#L235-L271","documentation":"Windows extraction path: both the PowerShell Expand-Archive fallback and the bsdtar `tar -xf` invocation exited with a non-zero status (formatted exit code). The archive exists but could not be extracted — likely corrupted download, disk-full, or a blocked path.","triggerScenarios":"Thrown at src-rust/crates/cli/src/upgrade.rs:253 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the upgrade; a truncated download is the most common cause","Free disk space and check the temp directory is writable","Extract the archive manually with File Explorer or `tar -xf` to see the underlying error"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b0637c97ec34144387cbf2f74f65df6d16a6cef1","analyzedAt":"2026-09-10T00:24:58.650Z","contentChangedAt":"2026-09-10T00:24:58.650Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}