{"record":{"id":"67f38366f703470f","repo":"zed-industries/zed","slug":"failed-to-extract-to","errorCode":null,"errorMessage":"failed to extract {:?} to {:?}: {:?}","messagePattern":"failed to extract (.+?) to (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/auto_update/src/auto_update.rs","lineNumber":1152,"sourceCode":") -> Result<Option<PathBuf>> {\n    let home_dir = PathBuf::from(env::var(\"HOME\").context(\"no HOME env var set\")?);\n\n    let extracted = temp_dir.path().join(\"zed\");\n    fs::create_dir_all(&extracted)\n        .await\n        .context(\"failed to create directory into which to extract update\")?;\n\n    let mut cmd = new_command(\"tar\");\n    cmd.arg(\"-xzf\")\n        .arg(&downloaded_tar_gz)\n        .arg(\"-C\")\n        .arg(&extracted);\n    let output = cmd\n        .output()\n        .await\n        .with_context(|| \"failed to extract: {cmd}\")?;\n\n    anyhow::ensure!(\n        output.status.success(),\n        \"failed to extract {:?} to {:?}: {:?}\",\n        downloaded_tar_gz,\n        extracted,\n        String::from_utf8_lossy(&output.stderr)\n    );\n\n    let suffix = if channel != \"stable\" {\n        format!(\"-{}\", channel)\n    } else {\n        String::default()\n    };\n    let app_folder_name = format!(\"zed{}.app\", suffix);\n\n    let from = extracted.join(&app_folder_name);\n    let mut to = home_dir.join(\".local\");\n\n    let expected_suffix = format!(\"{}/libexec/zed-editor\", app_folder_name);","sourceCodeStart":1134,"sourceCodeEnd":1170,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/auto_update/src/auto_update.rs#L1134-L1170","documentation":"install_release_linux ran `tar -xzf` to extract the downloaded update archive into a temp extraction directory and the child process exited with a non-zero status; the message embeds the archive path, destination, and exit status, meaning the tarball was corrupt, truncated, or incompatible rather than merely missing.","triggerScenarios":"Thrown at crates/auto_update/src/auto_update.rs:1141 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete the partial download and re-fetch the release archive, then retry installation","Verify the downloaded tarball's checksum/size before extracting","Ensure tar and gzip are installed and the temp directory has space and write permissions"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}