feat: remove source tree on successful run

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius
2023-12-21 16:28:12 +02:00
parent a5e8bfed79
commit 28a93105a3
+5
View File
@@ -156,6 +156,8 @@ fn run(
run_log.write("CI run finished successfully\n".into())?;
std::fs::remove_dir_all(src).map_err(|e| NativeError::RemoveDir(src.into(), e))?;
Ok(())
}
@@ -335,4 +337,7 @@ enum NativeError {
#[error("failed to write to log file {0}")]
WriteLogFile(PathBuf, #[source] std::io::Error),
#[error("failed to remove {0}")]
RemoveDir(PathBuf, #[source] std::io::Error),
}