Cache path for an extracted supervisor binary, keyed by the image's content-addressable digest (e.g. `sha256:abc123…`). The digest-prefixed directory keeps stale extractions from earlier releases isolated so they can be GC'd without affecting the active binary.
(digest: &str)
| 3368 | /// directory keeps stale extractions from earlier releases isolated so they |
| 3369 | /// can be GC'd without affecting the active binary. |
| 3370 | fn supervisor_cache_path(digest: &str) -> CoreResult<PathBuf> { |
| 3371 | let base = openshell_core::paths::xdg_data_dir() |
| 3372 | .map_err(|err| Error::config(format!("failed to resolve XDG data dir: {err}")))?; |
| 3373 | Ok(supervisor_cache_path_with_base(&base, digest)) |
| 3374 | } |
| 3375 | |
| 3376 | fn supervisor_cache_path_with_base(base: &Path, digest: &str) -> PathBuf { |
| 3377 | let sanitized = digest.replace(':', "-"); |
no test coverage detected