Skip to main content

find_command

Function find_command 

Source
pub fn find_command(
    sub_cmd: &str,
    default_libexec_path: Option<&str>,
) -> SnixCliResult<PathBuf>
Expand description

Search for a snix sub-command.

This searches the paths in the SNIX_LIBEXEC_PATH environment variable, the default_libexec_path argument, the PATH environment variable and the directory of the current executable in that order for a binary called snix-{sub_cmd} and will return the absolute path to it if found.