Provide hints about which files can be restored
This commit is contained in:
parent
5915929166
commit
c2b769bd95
|
@ -56,7 +56,18 @@ class DiscourseCLI < Thor
|
|||
end
|
||||
|
||||
desc "restore", "Restore a Discourse backup"
|
||||
def restore(filename)
|
||||
def restore(filename=nil)
|
||||
|
||||
if !filename
|
||||
puts "You must provide a filename to restore. Did you mean one of the following?\n\n"
|
||||
|
||||
Dir["public/backups/default/*"].each do |f|
|
||||
puts "script/discourse restore #{File.basename(f)}"
|
||||
end
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
load_rails
|
||||
require "backup_restore/backup_restore"
|
||||
require "backup_restore/restorer"
|
||||
|
|
Loading…
Reference in New Issue