Return the skopeo binary path, honouring the `BOOTC_EXP_EXTERNAL_CONTAINER_TOOL` environment variable so callers can substitute an alternative tool (e.g. `dtool`) without hard-linking it as `/usr/bin/skopeo`. The _EXP prefix indicates this interface is experimental and subject to change.
()
| 40 | /// without hard-linking it as `/usr/bin/skopeo`. The _EXP prefix indicates this |
| 41 | /// interface is experimental and subject to change. |
| 42 | pub fn skopeo_bin() -> &'static str { |
| 43 | static BIN: std::sync::OnceLock<String> = std::sync::OnceLock::new(); |
| 44 | BIN.get_or_init(|| { |
| 45 | std::env::var("BOOTC_EXP_EXTERNAL_CONTAINER_TOOL").unwrap_or_else(|_| "skopeo".to_string()) |
| 46 | }) |
| 47 | } |
| 48 | |
| 49 | /// Intended for use in `main`, calls an inner function and |
| 50 | /// handles errors by printing them. |
no outgoing calls
no test coverage detected