Podman user socket path for the current platform.
()
| 3288 | |
| 3289 | /// Podman user socket path for the current platform. |
| 3290 | fn 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 | |
| 3308 | fn is_openshell_local_build_image_ref(image_ref: &str) -> bool { |
| 3309 | image_ref.starts_with("openshell/sandbox-from:") |
no outgoing calls
no test coverage detected