(command: &str)
| 258 | } |
| 259 | |
| 260 | fn command_exists(command: &str) -> bool { |
| 261 | if command.contains(std::path::MAIN_SEPARATOR) { |
| 262 | return is_executable_file(Path::new(command)); |
| 263 | } |
| 264 | |
| 265 | std::env::var_os("PATH").is_some_and(|path| { |
| 266 | std::env::split_paths(&path).any(|dir| is_executable_file(&dir.join(command))) |
| 267 | }) |
| 268 | } |
| 269 | |
| 270 | fn docker_is_podman_shim() -> bool { |
| 271 | if !command_exists("docker") { |
no test coverage detected