Make sure a driver is always set on a VM object
This commit is contained in:
parent
97cf6ddfba
commit
40901dc2e6
|
@ -128,10 +128,12 @@ module Vagrant
|
|||
begin
|
||||
@driver = Driver::VirtualBox.new(@uuid)
|
||||
rescue Driver::VirtualBox::VMNotFound
|
||||
# Clear the UUID since this VM doesn't exist. Note that this calls
|
||||
# back into `reload!` but shouldn't ever result in infinite
|
||||
# recursion since `@uuid` will be nil.
|
||||
# Clear the UUID since this VM doesn't exist.
|
||||
@uuid = nil
|
||||
|
||||
# Reset the driver. This shouldn't raise a VMNotFound since we won't
|
||||
# feed it a UUID.
|
||||
@driver = Driver::VirtualBox.new
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue