Commit cb6a86ed authored by Jacob Vosmaer's avatar Jacob Vosmaer

Skip rather than fail empty wikis during backup

parent 461abaa8
...@@ -28,7 +28,9 @@ module Backup ...@@ -28,7 +28,9 @@ module Backup
if File.exists?(path_to_repo(wiki)) if File.exists?(path_to_repo(wiki))
print " * #{wiki.path_with_namespace} ... " 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 puts " [DONE]".green
else else
puts " [FAILED]".red puts " [FAILED]".red
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment