Skip to content

Commit

Permalink
fix(ext/cache) create cache directory
Browse files Browse the repository at this point in the history
  • Loading branch information
tsirysndr committed Mar 26, 2024
1 parent 4f9a6b2 commit 44ee5c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/ext/src/cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 44ee5c9

Please sign in to comment.