From eb0e27f77a8be267bb7b55bab8d076f0763abdf6 Mon Sep 17 00:00:00 2001 From: Colin Woodbury Date: Mon, 2 Oct 2023 16:14:24 +0900 Subject: [PATCH] fix: ensure `target/cargo-aur` exists before writing to it --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index 0e9b20f..3a35436 100644 --- a/src/main.rs +++ b/src/main.rs @@ -206,6 +206,10 @@ fn work(args: Args) -> Result<(), Error> { musl_check()? } + // Ensure the target can actually be written to. Otherwise the `tar` + // operation later on will fail. + std::fs::create_dir_all("target/cargo-aur")?; + let config = cargo_config()?; // Warn if the user if still using the old metadata definition style.