MCPcopy Create free account
hub / github.com/Nariod/RustPacker / find_container_runtime

Function find_container_runtime

src/compiler.rs:17–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17fn 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
29fn image_exists(runtime: &str) -> bool {
30 Command::new(runtime)

Callers 1

run_compilerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected