lib/mortar/command/projects.rb in mortar-0.8.6 vs lib/mortar/command/projects.rb in mortar-0.8.7

- old
+ new

@@ -46,9 +46,16 @@ unless name error("Usage: mortar projects:delete PROJECTNAME\nMust specify PROJECTNAME.") end validate_arguments! + # delete embedded project mirror if one exists + mirror_dir = "#{git.mortar_mirrors_dir()}/#{name}" + if File.directory? mirror_dir + FileUtils.rm_r mirror_dir + end + + # delete Mortar remote project_id = nil action("Sending request to delete project: #{name}") do api.delete_project(name).body["project_id"] end display "\nYour project has been deleted."