Skip to main content

resolve_command

Function resolve_command 

Source
pub fn resolve_command(command: &str) -> Result<PathBuf>
Expand description

Resolve command to an absolute path on disk.

  • If command is already absolute or contains a path separator, canonicalize it (resolves symlinks).
  • Otherwise consult PATH (and try a .exe suffix on Windows). Returns the first match found, canonicalized.

Returns an error if the binary can’t be located.