Skip to content

Commit

Permalink
feat: Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Oct 30, 2023
1 parent b75f49f commit c6be1fc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/toolchain/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,12 @@ use directories::BaseDirs;
use log::{info, warn};
use miette::Result;
use regex::Regex;
use std::env;
use std::path::{Path, PathBuf};
#[cfg(unix)]
use std::os::unix::fs::symlink;
use std::{
fs::create_dir_all,
path::{Path, PathBuf},
};
use tokio::fs::remove_dir_all;

const DEFAULT_LLVM_REPOSITORY: &str = "https://github.com/espressif/llvm-project/releases/download";
Expand Down Expand Up @@ -153,6 +157,7 @@ impl Llvm {

if espup_dir.exists() {
remove_dir_all(espup_dir.display().to_string())
.await
.map_err(|_| Error::RemoveDirectory(espup_dir.display().to_string()))?;
}
}
Expand Down Expand Up @@ -215,6 +220,7 @@ impl Installable for Llvm {
let llvm_symlink_path = espup_dir.join("esp-clang");
if llvm_symlink_path.exists() {
remove_dir_all(&llvm_symlink_path)
.await
.map_err(|_| Error::RemoveDirectory(llvm_symlink_path.display().to_string()))?;
}
info!(
Expand Down

0 comments on commit c6be1fc

Please sign in to comment.