Skip to content

Commit

Permalink
chore: fix config tests for OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelramos committed Oct 25, 2024
1 parent c1c25e1 commit 094e3d0
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions crates/workspace_std/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,15 @@ impl MonorepoWorkspace {
pub fn new() -> Self {
let temp_dir = temp_dir();
let monorepo_root_dir = &temp_dir.join("monorepo-workspace");
let root = &std::fs::canonicalize(monorepo_root_dir.as_os_str()).expect("Invalid path");

if monorepo_root_dir.exists() {
remove_dir_all(monorepo_root_dir).expect("Unable to remove directory");
if root.exists() {
remove_dir_all(root).expect("Unable to remove directory");
}

create_dir_all(monorepo_root_dir).expect("Unable to create monorepo directory");
create_dir_all(root).expect("Unable to create monorepo directory");

Self {
root: monorepo_root_dir.clone(),
repository: Repository::new(monorepo_root_dir.as_path()),
}
Self { root: root.clone(), repository: Repository::new(root.as_path()) }
}

#[allow(clippy::too_many_lines)]
Expand Down

0 comments on commit 094e3d0

Please sign in to comment.