Skip to content

Commit

Permalink
add also error message improvement on bz2 compress
Browse files Browse the repository at this point in the history
Signed-off-by: Soc Virnyl Estela <[email protected]>
  • Loading branch information
uncomfyhalomacro committed Dec 11, 2023
1 parent cd9799b commit 2881e5f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cargo/src/utils/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ pub fn tarbz2(
) -> io::Result<()> {
use bzip2::write::BzEncoder;
use bzip2::Compression;
let outtar = fs::File::create(outpath.as_ref())?;
let outtar = fs::File::create(outpath.as_ref()).map_err(|err| {
error!(outpath = ?outpath.as_ref(), "Unable to create outtar");
err
})?;
let encoder = BzEncoder::new(outtar, Compression::best());
let mut builder = tar::Builder::new(encoder);
tar_builder(&mut builder, prjdir, archive_files)
Expand Down

0 comments on commit 2881e5f

Please sign in to comment.