{"record":{"id":"7f7591ff3947e84d","repo":"zed-industries/zed","slug":"bwrap-resolved-to-bwrap-path-rather-than-an","errorCode":null,"errorMessage":"`bwrap` resolved to {bwrap_path:?} rather than an absolute path; a shell alias or function named `bwrap` cannot be run with `wsl --exec`","messagePattern":"`bwrap` resolved to (.+?) rather than an absolute path; a shell alias or function named `bwrap` cannot be run with `wsl --exec`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/sandbox/src/windows_wsl.rs","lineNumber":838,"sourceCode":"/// Parse [`probe_script`] output: the last [`PROBE_RESULT_PREFIX`]-marked\n/// line wins, so stdout noise from login-shell profile scripts (which runs\n/// before the script body) is ignored.\nfn parse_probe_output(stdout: &str) -> Result<EnvironmentProbe> {\n    let line = stdout\n        .lines()\n        .rev()\n        .find_map(|line| line.strip_prefix(PROBE_RESULT_PREFIX))\n        .with_context(|| format!(\"no probe result line in: {stdout:?}\"))?;\n    let (interop, bwrap_path) = line\n        .trim_start()\n        .split_once(' ')\n        .with_context(|| format!(\"malformed probe result line: {line:?}\"))?;\n    let mask_interop_dir = match interop {\n        \"interop\" => true,\n        \"no-interop\" => false,\n        _ => bail!(\"malformed probe result line: {line:?}\"),\n    };\n    ensure!(\n        bwrap_path.starts_with('/'),\n        \"`bwrap` resolved to {bwrap_path:?} rather than an absolute path; a shell \\\n         alias or function named `bwrap` cannot be run with `wsl --exec`\"\n    );\n    Ok(EnvironmentProbe {\n        mask_interop_dir,\n        bwrap_path: bwrap_path.to_string(),\n    })\n}\n\n/// Ensure a Linux `zed` of the given release `channel`/`version` is available\n/// inside WSL and return its absolute in-WSL path, to be `--exec`'d as the\n/// `--wsl-sandbox-helper`. Runs [`HELPER_PROVISION_SCRIPT`] (which downloads the\n/// matching release tarball into an off-`PATH` location on first use).\n///\n/// Successful resolutions are cached per `(distro, channel, version)` for the\n/// life of the process — once provisioned, the path won't change. Failures are\n/// not cached, so a user who installs `curl` (or fixes networking) after an","sourceCodeStart":820,"sourceCodeEnd":856,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/sandbox/src/windows_wsl.rs#L820-L856","documentation":"The environment probe resolved bwrap to a relative path, meaning a shell alias or function named bwrap was found instead of the real binary. `wsl --exec` bypasses the shell, so such an alias cannot be used to run the sandbox.","triggerScenarios":"Thrown at crates/sandbox/src/windows_wsl.rs:838 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install the real bwrap binary on PATH inside the WSL distro","Remove or rename the bwrap shell alias/function so resolution finds the actual executable","Set ZED_WSL_BWRAP (or equivalent) to the absolute bwrap path"],"exampleFix":null,"handlingStrategy":"validation","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"}