From 009ca941679e08034ec3f9d98b2f0f2098177e49 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Mon, 6 Mar 2017 08:19:02 -0800 Subject: [PATCH] Sort result of BoxCollection#all --- lib/vagrant/box_collection.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/box_collection.rb b/lib/vagrant/box_collection.rb index 17b0eb405..bbcf10161 100644 --- a/lib/vagrant/box_collection.rb +++ b/lib/vagrant/box_collection.rb @@ -246,7 +246,10 @@ module Vagrant end end end - + # Sort the list to group like providers and properly ordered versions + results.sort_by! do |box_result| + [box_result[0], box_result[2], Gem::Version.new(box_result[1])] + end results end