{"record":{"id":"d1222127555fa04a","repo":"zed-industries/zed","slug":"failed-to-copy-app-bundle","errorCode":null,"errorMessage":"failed to copy app bundle: {}","messagePattern":"failed to copy app bundle: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zed/src/zed/move_to_applications.rs","lineNumber":299,"sourceCode":"        .await\n        .with_context(|| format!(\"failed to create {}\", parent.display()))?;\n\n    let mut source_with_contents: OsString = source.into();\n    source_with_contents.push(\"/\");\n    let mut destination_with_contents: OsString = destination.into();\n    destination_with_contents.push(\"/\");\n\n    let mut command = new_command(\"rsync\");\n    command\n        .args([\"-a\", \"--delete\"])\n        .arg(&source_with_contents)\n        .arg(&destination_with_contents);\n    let output = command\n        .output()\n        .await\n        .with_context(|| format!(\"failed to run rsync for {}\", source.display()))?;\n\n    anyhow::ensure!(\n        output.status.success(),\n        \"failed to copy app bundle: {}\",\n        String::from_utf8_lossy(&output.stderr)\n    );\n\n    Ok(())\n}\n\nfn restart_into(app_path: PathBuf, cx: &mut AsyncWindowContext) -> Result<()> {\n    cx.update(|_window, cx| {\n        cx.set_restart_path(app_path);\n        cx.restart();\n    })?;\n    Ok(())\n}\n\nfn user_applications_directory() -> Option<PathBuf> {\n    std::env::var_os(\"HOME\")","sourceCodeStart":281,"sourceCodeEnd":317,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/zed/src/zed/move_to_applications.rs#L281-L317","documentation":"Raised in copy_app_bundle (macOS install flow) when the `rsync -a --delete source/ destination/` command that duplicates the .app bundle fails to run. The context formats the failure with the source path; installation to /Applications cannot proceed.","triggerScenarios":"Thrown at crates/zed/src/zed/move_to_applications.rs:299 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check permissions in /Applications (may need admin)","Ensure rsync is available and retry the move"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}