Fix box collection sorting with mixed architecture
When the box collection consists of a mix of entries with architecture information and without architecture information, ensure the values are a common type so sorting does not result in an error.
This commit is contained in:
parent
3eb85f9286
commit
b741d8332b
@ -299,7 +299,12 @@ module Vagrant
|
|||||||
end
|
end
|
||||||
# Sort the list to group like providers and properly ordered versions
|
# Sort the list to group like providers and properly ordered versions
|
||||||
results.sort_by! do |box_result|
|
results.sort_by! do |box_result|
|
||||||
[box_result[0], box_result[2], Gem::Version.new(box_result[1]), box_result[3]]
|
[
|
||||||
|
box_result[0],
|
||||||
|
box_result[2],
|
||||||
|
Gem::Version.new(box_result[1]),
|
||||||
|
box_result[3] || :""
|
||||||
|
]
|
||||||
end
|
end
|
||||||
results
|
results
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user