Skip to content

Commit b94fdbe

Browse files
committed
unencapsulate: Add errctx for decompression
We think this may be implicated in the mysterious "broken pipe" errors.
1 parent 900990a commit b94fdbe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/src/container/unencapsulate.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
use crate::container::store::LayerProgress;
3535

3636
use super::*;
37+
use anyhow::Context as _;
3738
use containers_image_proxy::{ImageProxy, OpenedImage};
3839
use fn_error_context::context;
3940
use futures_util::{Future, FutureExt, TryFutureExt as _};
@@ -225,7 +226,7 @@ pub(crate) fn decompress_bridge(
225226
Box::new(flate2::bufread::GzDecoder::new(bufr))
226227
};
227228
// We don't care about the number of bytes copied
228-
let _n: u64 = std::io::copy(&mut src, &mut tx)?;
229+
let _n: u64 = std::io::copy(&mut src, &mut tx).context("Copying for decompression")?;
229230
Ok(())
230231
})
231232
// Flatten the nested Result<Result<>>

0 commit comments

Comments
 (0)