Skip to content

Commit

Permalink
Check if .git exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Mirch committed Sep 29, 2024
1 parent edcc21c commit fd756b9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pont_data/pont_project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ impl PontProject {
}

fs::remove_file(self.directory.path.join(PONT_FILE_NAME))?;
fs::remove_dir_all(self.directory.path.join(".git"))?;

let git_path = self.directory.path.join(".git");
if fs::exists(git_path.clone())? {
fs::remove_dir_all(git_path)?;
}

let mut commands = vec![
"git init".to_string(),
Expand Down

0 comments on commit fd756b9

Please sign in to comment.