shipper 0.3.0-rc.1

Core library for reliable, resumable Rust workspace publishing
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Locate executables on `PATH`.

/// Check if a command exists in PATH.
#[allow(dead_code)]
pub(crate) fn command_exists(program: &str) -> bool {
    which::which(program).is_ok()
}

/// Get the full path to a command.
#[allow(dead_code)]
pub(crate) fn which(program: &str) -> Option<std::path::PathBuf> {
    which::which(program).ok()
}