summaryrefslogtreecommitdiff
path: root/lib/backup/repository.rb
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2013-10-09 17:17:04 +0200
committerJacob Vosmaer <contact@jacobvosmaer.nl>2013-10-10 16:07:39 +0200
commitcb6a86ed622bae50dad97cb67b9b7212806bb3c8 (patch)
tree5ed1fab83c54195ff8f4396a8408c959d032cb82 /lib/backup/repository.rb
parent461abaa843b5c21a5103fde802db770dd583ac92 (diff)
downloadgitlab-ce-cb6a86ed622bae50dad97cb67b9b7212806bb3c8.tar.gz
Skip rather than fail empty wikis during backup
Diffstat (limited to 'lib/backup/repository.rb')
-rw-r--r--lib/backup/repository.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb
index c5e3d049fd7..252201f11be 100644
--- a/lib/backup/repository.rb
+++ b/lib/backup/repository.rb
@@ -28,7 +28,9 @@ module Backup
if File.exists?(path_to_repo(wiki))
print " * #{wiki.path_with_namespace} ... "
- if system("cd #{path_to_repo(wiki)} > /dev/null 2>&1 && git bundle create #{path_to_bundle(wiki)} --all > /dev/null 2>&1")
+ if wiki.empty?
+ puts " [SKIPPED]".cyan
+ elsif system("cd #{path_to_repo(wiki)} > /dev/null 2>&1 && git bundle create #{path_to_bundle(wiki)} --all > /dev/null 2>&1")
puts " [DONE]".green
else
puts " [FAILED]".red