Fix version sorting in box_collection.rb

This commit is contained in:
David O'Rourke 2016-11-01 14:57:06 +00:00
parent e5f7d0db88
commit 7b89374dce
1 changed files with 2 additions and 2 deletions

View File

@ -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?