From 7b89374dcebe1a534f95a70885e56ac81399da23 Mon Sep 17 00:00:00 2001 From: David O'Rourke Date: Tue, 1 Nov 2016 14:57:06 +0000 Subject: [PATCH] Fix version sorting in box_collection.rb --- lib/vagrant/box_collection.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/box_collection.rb b/lib/vagrant/box_collection.rb index 5a295df29..d3cca1b83 100644 --- a/lib/vagrant/box_collection.rb +++ b/lib/vagrant/box_collection.rb @@ -276,7 +276,7 @@ module Vagrant next if !versiondir.directory? next if versiondir.basename.to_s.start_with?(".") - version = versiondir.basename.to_s + version = Gem::Version.new(versiondir.basename.to_s) end.compact # Traverse through versions with the latest version first @@ -286,7 +286,7 @@ module Vagrant next end - versiondir = box_directory.join(v) + versiondir = box_directory.join(v.to_s) providers.each do |provider| provider_dir = versiondir.join(provider.to_s) next if !provider_dir.directory?