Skip to content

Commit e4e295d

Browse files
committed
print error for remove recrusive
1 parent a13a620 commit e4e295d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/initialize_everything.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ pub fn init_yes(
4242
let path_exists_prompt = boolean(&format!("`{}` {}", path_to_export.bright_black(), "path exists. Do you wish to delete it?".yellow()));
4343

4444
if path_exists_prompt == "yes" {
45-
fs::remove_dir_all(extended_path).unwrap();
45+
if let Err(e) = fs::remove_dir_all(extended_path) {
46+
eprintln!("Failed to remove directory: {}", e);
47+
}
4648
} else {
4749
print!("{}", "Exiting...".yellow());
4850
std::process::exit(0);

0 commit comments

Comments
 (0)