From cb6a86ed622bae50dad97cb67b9b7212806bb3c8 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 9 Oct 2013 17:17:04 +0200 Subject: Skip rather than fail empty wikis during backup --- lib/backup/repository.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.1