pub fn resolve_command(command: &str) -> Result<PathBuf>Expand description
Resolve command to an absolute path on disk.
- If
commandis already absolute or contains a path separator, canonicalize it (resolves symlinks). - Otherwise consult
augmented_path_var(and try a.exesuffix on Windows). Returns the first match found, canonicalized.
Resolving against the AUGMENTED PATH — not the raw ambient one — is what
keeps install-time and runtime agreeing. mur agent mcp add / addon import
run under whatever PATH their parent had: a terminal has ~/.local/bin, a
Hub-spawned sidecar does not. The runtime always spawns against
augmented_path_var, so a raw-PATH resolve here made command: uvx
installable from a shell and “could not find uvx on PATH” from the Hub —
the same entry, two answers. Ambient entries still keep priority, so this
only ever finds MORE binaries, never a different one.
Returns an error if the binary can’t be located.