Fix removeing project if repo not exists
This commit is contained in:
parent
20a4742efd
commit
2812e6f1f5
|
@ -88,7 +88,10 @@ module Gitlab
|
|||
end
|
||||
|
||||
def destroy_project(project)
|
||||
FileUtils.rm_rf(project.repository.path_to_repo)
|
||||
# do rm-rf only if repository exists
|
||||
if project.repository
|
||||
FileUtils.rm_rf(project.repository.path_to_repo)
|
||||
end
|
||||
conf.rm_repo(project.path_with_namespace)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue