From 371377ebfc8d82bf48703d954c34d31e6238fe12 Mon Sep 17 00:00:00 2001 From: sophia Date: Wed, 19 Jan 2022 16:35:14 -0600 Subject: [PATCH] Use provider to get current state for now --- lib/vagrant/machine/remote.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/machine/remote.rb b/lib/vagrant/machine/remote.rb index 4ca83e9fd..77448420a 100644 --- a/lib/vagrant/machine/remote.rb +++ b/lib/vagrant/machine/remote.rb @@ -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