From 0cf2ea2eb6e7d14ae4526c3face23c7007f284bf Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Thu, 10 Feb 2022 10:43:44 -0800 Subject: [PATCH] Update wrapper initializer to use client from manager --- lib/vagrant/plugin/remote/manager.rb | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/vagrant/plugin/remote/manager.rb b/lib/vagrant/plugin/remote/manager.rb index f2a6df854..d8fac2d89 100644 --- a/lib/vagrant/plugin/remote/manager.rb +++ b/lib/vagrant/plugin/remote/manager.rb @@ -33,14 +33,11 @@ module Vagrant end def initialize(*args, **kwargs, &block) - info = Thread.current.thread_variable_get(:service_info) - if info&.plugin_manager - client = info.plugin_manager.get_plugin( - name: self.class.plugin_name, - type: self.class.type - ) - kwargs[:client] = client - end + client = Manager.client.get_plugin( + name: self.class.plugin_name, + type: self.class.type + ) + kwargs[:client] = client super(*args, **kwargs, &block) end