From 44ee5c98dabdf9e7a88153b43120bf571b32c932 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Tue, 26 Mar 2024 09:05:58 +0000 Subject: [PATCH] fix(ext/cache) create cache directory --- crates/ext/src/cache/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/ext/src/cache/mod.rs b/crates/ext/src/cache/mod.rs index 33d538c..656eaf0 100644 --- a/crates/ext/src/cache/mod.rs +++ b/crates/ext/src/cache/mod.rs @@ -76,6 +76,11 @@ pub async fn download(key: &str) -> Result<(), Error> { ); if let Some(CacheBackendType::CDN) = default_backend { + fs::create_dir_all(format!( + "{}/.fluentci/cache", + dirs::home_dir().unwrap().to_str().unwrap() + ))?; + let prefix = format!("{}/{}", env::consts::OS, env::consts::ARCH); let url = std::env::var("FLUENTCI_CACHE_CDN_ENDPOINT")?; let filename = cache_file.split("/").last().unwrap();