Commit cb6a86ed622bae50dad97cb67b9b7212806bb3c8
1 parent
461abaa8
Exists in
master
and in
4 other branches
Skip rather than fail empty wikis during backup
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
lib/backup/repository.rb
@@ -28,7 +28,9 @@ module Backup | @@ -28,7 +28,9 @@ module Backup | ||
28 | 28 | ||
29 | if File.exists?(path_to_repo(wiki)) | 29 | if File.exists?(path_to_repo(wiki)) |
30 | print " * #{wiki.path_with_namespace} ... " | 30 | print " * #{wiki.path_with_namespace} ... " |
31 | - if system("cd #{path_to_repo(wiki)} > /dev/null 2>&1 && git bundle create #{path_to_bundle(wiki)} --all > /dev/null 2>&1") | 31 | + if wiki.empty? |
32 | + puts " [SKIPPED]".cyan | ||
33 | + elsif system("cd #{path_to_repo(wiki)} > /dev/null 2>&1 && git bundle create #{path_to_bundle(wiki)} --all > /dev/null 2>&1") | ||
32 | puts " [DONE]".green | 34 | puts " [DONE]".green |
33 | else | 35 | else |
34 | puts " [FAILED]".red | 36 | puts " [FAILED]".red |