fn check_binary(binary: &str, verbose: bool) -> Result<()> {
    if let Ok(path) = env::var("PATH") {
        for p in path.split(':') {
            let path = format!("{p}/{binary}");
            if Path::new(&path).exists() {
                if verbose {
                    println!("In search for binaries, found {}", &path);
                }
                return Ok(());
            }
        }
        bail!("Could not find binary {} in PATH", binary)
    }

    bail!("Binaries not checked. This is an error with leftwm-check, we would appreciate a bug report: https://github.com/leftwm/leftwm/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml")
}
Check to determine if `binary` exists in PATH

# Errors
- Will return an error if the listed `binary` can not be found in PATH
Resolutions may include:
- Installing leftwm using `cargo install --path {path}` where {path} is a directory in
PATH
- Setting the PATH variable, usually in .bashrc, .profile, or similar depending on your
shell
- Will return an error if the PATH environmental variable is not set
Resolutions may include:
- Setting the PATH variable, usually in .bashrc, .profile, or similar depending on your
shell
leftwm/src/bin/leftwm-check.rs