From e61edfd13ade7643cfab7e780fc7163ab4f19356 Mon Sep 17 00:00:00 2001 From: Jay Pfaffman Date: Thu, 5 Oct 2017 15:20:14 -0700 Subject: [PATCH] UX: discourse restore -- sort by date --- script/discourse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/discourse b/script/discourse index c5d16d36e39..85b7fa491af 100755 --- a/script/discourse +++ b/script/discourse @@ -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