zed-industries/zed · error
--diff path does not exist: {diff_path}
Error message
--diff path does not exist: {diff_path} What it means
Error "--diff path does not exist: {diff_path}" thrown in zed-industries/zed.
Source
Thrown at crates/cli/src/main.rs:651
let exit_status = Arc::new(Mutex::new(None));
let mut paths = vec![];
let mut urls = vec![];
let mut diff_paths = vec![];
let mut stdin_tmp_file: Option<fs::File> = None;
let mut anonymous_fd_tmp_files = vec![];
// Check if any diff paths are directories to determine diff_all mode
let diff_all_mode = args
.diff
.chunks(2)
.any(|pair| Path::new(&pair[0]).is_dir() || Path::new(&pair[1]).is_dir());
for path in args.diff.chunks(2) {
let left = parse_path_with_position(&path[0])?;
let right = parse_path_with_position(&path[1])?;
for diff_path in [&left, &right] {
anyhow::ensure!(
diff_path_exists(diff_path),
"--diff path does not exist: {diff_path}"
);
}
diff_paths.push([left, right]);
}
let (expanded_diff_paths, temp_dirs) = expand_directory_diff_pairs(diff_paths)?;
diff_paths = expanded_diff_paths;
// Prevent automatic cleanup of temp directories containing empty stub files
// for directory diffs. The CLI process may exit before Zed has read these
// files (e.g., when RPC-ing into an already-running instance). The files
// live in the OS temp directory and will be cleaned up on reboot.
for temp_dir in temp_dirs {
let _ = temp_dir.keep();
}
#[cfg(target_os = "windows")]View on GitHub (pinned to bc538def45)
When it happens
Trigger: Thrown at crates/cli/src/main.rs:651 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16).
Data as JSON: /api/errors/3df31e2e2f02d67f.
Report an issue: GitHub.