Use provider to get current state for now

This commit is contained in:
sophia 2022-01-19 16:35:14 -06:00 committed by Paul Hinze
parent 8a39ee6960
commit 371377ebfc
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -98,7 +98,16 @@ module Vagrant
end
def state
client.machine_state
# TODO: this should be using the vagrant go core (client.machine_state).
# Since there is currently no way to access providers in the go machine
# leave this here for now. Once the provider has been ported, this should
# be updated.
s = @provider.state
if s != @_cached_state
client.set_machine_state(s) unless s.nil?
@_cached_state = s
end
s
end
def provider