Merge pull request #5225 from pfaffman/discourse-restore-sort

UX: discourse restore -- sort by date
This commit is contained in:
Guo Xiang Tan 2017-10-06 15:59:09 +08:00 committed by GitHub
commit 19d04dd9eb

View File

@ -96,7 +96,7 @@ class DiscourseCLI < Thor
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|
Dir["public/backups/default/*"].sort_by { |filename| File.mtime(filename) }.reverse.each do |f|
puts "#{discourse} restore #{File.basename(f)}"
end