Skip to content

Commit

Permalink
Merge pull request coreos#4498 from cgwalters/more-errprefix5
Browse files Browse the repository at this point in the history
container: Clarify error for nonexistent previous manifest file
  • Loading branch information
jmarrero committed Jul 11, 2023
2 parents e107280 + 99505c0 commit 1a98356
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rust/src/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,10 @@ pub fn container_encapsulate(args: Vec<String>) -> CxxResult<()> {
let package_structure = opt
.previous_build_manifest
.as_ref()
.map(|p| oci_spec::image::ImageManifest::from_file(&p).map_err(anyhow::Error::new))
.map(|p| {
oci_spec::image::ImageManifest::from_file(&p)
.map_err(|e| anyhow::anyhow!("Failed to read previous manifest {p}: {e}"))
})
.transpose()?;

let mut copy_meta_keys = opt.copy_meta_keys;
Expand Down

0 comments on commit 1a98356

Please sign in to comment.