Radish alpha
r
rad:z3qg5TKmN83afz2fj9z3fQjU8vaYE
Radicle CI adapter for native CI
Radicle
Git
feat: remove source tree on successful run
Lars Wirzenius committed 2 years ago
commit 28a93105a3bb4654ee5dc167b096da4cbb0bb551
parent a5e8bfe
1 file changed +5 -0
modified src/main.rs
@@ -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),
}