From 2fc65def46564de46e9b1f5b2b7a81e4029b6058 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Tue, 21 Nov 2023 18:42:07 +0100 Subject: [PATCH] cli-test: Create dirs automatically --- radicle-cli-test/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/radicle-cli-test/src/lib.rs b/radicle-cli-test/src/lib.rs index 0bf701f4..9938e0ae 100644 --- a/radicle-cli-test/src/lib.rs +++ b/radicle-cli-test/src/lib.rs @@ -438,7 +438,8 @@ impl TestFormula { log::debug!(target: "test", "{path}: Running `{}` with {:?} in `{}`..", cmd.display(), assertion.args, run.path().display()); if !run.path().exists() { - log::error!(target: "test", "{path}: Directory {} does not exist..", run.path().display()); + log::warn!(target: "test", "{path}: Directory {} does not exist. Creating..", run.path().display()); + fs::create_dir_all(run.path())?; } let bins = self