MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / podman_socket_path

Function podman_socket_path

crates/openshell-driver-vm/src/driver.rs:3290–3306  ·  view source on GitHub ↗

Podman user socket path for the current platform.

()

Source from the content-addressed store, hash-verified

3288
3289/// Podman user socket path for the current platform.
3290fn podman_socket_path() -> PathBuf {
3291 #[cfg(target_os = "macos")]
3292 {
3293 let home = std::env::var("HOME").unwrap_or_default();
3294 PathBuf::from(home).join(".local/share/containers/podman/machine/podman.sock")
3295 }
3296 #[cfg(target_os = "linux")]
3297 {
3298 std::env::var("XDG_RUNTIME_DIR").map_or_else(
3299 |_| {
3300 let uid = nix::unistd::getuid();
3301 PathBuf::from(format!("/run/user/{uid}/podman/podman.sock"))
3302 },
3303 |xdg| PathBuf::from(xdg).join("podman/podman.sock"),
3304 )
3305 }
3306}
3307
3308fn is_openshell_local_build_image_ref(image_ref: &str) -> bool {
3309 image_ref.starts_with("openshell/sandbox-from:")

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected