From a681f3a156728651e221c15396a2ee0898577f3c Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Fri, 10 Jun 2022 16:18:01 +1000 Subject: [PATCH] Add `debug!` logging to `untar` Signed-off-by: Jiahao XU --- src/helpers/extracter.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/helpers/extracter.rs b/src/helpers/extracter.rs index cc2fa495..dd5831f4 100644 --- a/src/helpers/extracter.rs +++ b/src/helpers/extracter.rs @@ -22,11 +22,15 @@ fn untar( let mut tar = Archive::new(dat); if let Some(desired_outputs) = desired_outputs { + debug!("Untaring only {desired_outputs:#?}"); + for res in tar.entries()? { let mut entry = res?; let entry_path = entry.path()?; if desired_outputs.contains(&entry_path) { + debug!("Extracting {entry_path:#?}"); + let dst = path.join(entry_path); fs::create_dir_all(dst.parent().unwrap())?; @@ -35,6 +39,7 @@ fn untar( } } } else { + debug!("Untaring entire tar"); tar.unpack(path)?; }