Simplify selecting disk from all_disks hash

This commit is contained in:
Brian Cain 2020-05-26 13:16:48 -07:00
parent 05d3045f3a
commit 39b5bb4beb
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0

View File

@ -52,7 +52,7 @@ module VagrantPlugins
# We can't rely on the order of `all_disks`, as they will not
# always come in port order, but primary should always be Location 0 Number 0.
current_disk = all_disks.select { |d| d["ControllerLocation"] == 0 && d["ControllerNumber"] == 0 }.first
current_disk = all_disks.detect { |d| d["ControllerLocation"] == 0 && d["ControllerNumber"] == 0 }
# Need to get actual disk info to obtain UUID instead of what's returned
#