zed-industries/zed · error

Command '{:?}' failed: {}

Error message

Command '{:?}' failed: {}

What it means

In run_wsl_command_impl: the `wsl.exe` invocation either failed to spawn (context 'Failed to run command') or exited with a non-success status; the error embeds the command and stderr/stdout. Underlies all WSL helper commands (wslpath, cp, etc.).

Source

Thrown at crates/remote/src/transport/wsl.rs:713

    let wsl_path_str = wsl_path.to_string_lossy().to_string();
    let command = wsl_command_impl(options, "wslpath", &["-w", &wsl_path_str], true);
    async move {
        let windows_path = run_wsl_command_impl(command).await?;
        Ok(PathBuf::from(windows_path))
    }
}

fn run_wsl_command_impl(
    mut command: util::command::Command,
) -> impl Future<Output = Result<String>> {
    async move {
        let output = command
            .output()
            .await
            .with_context(|| format!("Failed to run command '{:?}'", command))?;

        if !output.status.success() {
            return Err(anyhow!(
                "Command '{:?}' failed: {}",
                command,
                String::from_utf8_lossy(&output.stderr).trim()
            ));
        }

        Ok(String::from_utf8_lossy(&output.stdout).trim().to_owned())
    }
}

/// Creates a new `wsl.exe` command that runs the given program with the given arguments.
///
/// If `exec` is true, the command will be executed in the WSL environment without spawning a new shell.
fn wsl_command_impl(
    options: &WslConnectionOptions,
    program: &str,
    args: &[impl AsRef<OsStr>],
    exec: bool,

View on GitHub (pinned to f4178619ac)

Solutions

  1. Verify the WSL distro is installed and running
  2. Inspect the included output for the wsl.exe error
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/remote/src/transport/wsl.rs:713 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/e3e0ac7e7202b720. Report an issue: GitHub.