()
| 15 | } |
| 16 | |
| 17 | fn find_container_runtime() -> Option<&'static str> { |
| 18 | ["podman", "docker"].into_iter().find(|cmd| { |
| 19 | Command::new(cmd) |
| 20 | .arg("--version") |
| 21 | .stdout(Stdio::null()) |
| 22 | .stderr(Stdio::null()) |
| 23 | .status() |
| 24 | .map(|s| s.success()) |
| 25 | .unwrap_or(false) |
| 26 | }) |
| 27 | } |
| 28 | |
| 29 | fn image_exists(runtime: &str) -> bool { |
| 30 | Command::new(runtime) |