(digestfile: Option<Utf8PathBuf>, digest: &str)
| 924 | } |
| 925 | |
| 926 | fn write_digest_file(digestfile: Option<Utf8PathBuf>, digest: &str) -> Result<()> { |
| 927 | if let Some(digestfile) = digestfile.as_deref() { |
| 928 | let rootfs = Dir::open_ambient_dir("/", cap_std::ambient_authority())?; |
| 929 | rootfs.write(digestfile.as_str().trim_start_matches('/'), digest)?; |
| 930 | } |
| 931 | Ok(()) |
| 932 | } |
| 933 | |
| 934 | /// Output the container image history |
| 935 | async fn container_history(repo: &ostree::Repo, imgref: &ImageReference) -> Result<()> { |