tovuk 0.1.67

Deploy Rust workers, static frontends, and worker-static apps to Tovuk.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::env;

pub(crate) fn has_command(command: &str) -> bool {
    env::var_os("PATH").is_some_and(|paths| {
        env::split_paths(&paths).any(|directory| {
            let candidate = directory.join(command);
            if cfg!(windows) {
                candidate.is_file() || directory.join(format!("{command}.exe")).is_file()
            } else {
                candidate.is_file()
            }
        })
    })
}