From 070292fb3bf5ef7fcb87569b8b48b87f33297699 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Thu, 10 Feb 2022 10:32:56 -0800 Subject: [PATCH] Add class level storage for remote manager client --- lib/vagrant/plugin/remote/manager.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/plugin/remote/manager.rb b/lib/vagrant/plugin/remote/manager.rb index dad1fcf56..f2a6df854 100644 --- a/lib/vagrant/plugin/remote/manager.rb +++ b/lib/vagrant/plugin/remote/manager.rb @@ -7,6 +7,10 @@ module Vagrant # as provides methods that allow querying all registered components of # those plugins as a single unit. class Manager + class << self + attr_accessor :client + end + WRAPPER_CLASS = proc do |klass| class << klass attr_accessor :plugin_name, :type @@ -66,8 +70,7 @@ module Vagrant end def plugin_manager - info = Thread.current.thread_variable_get(:service_info) - info.plugin_manager if info + self.class.client end # Synced folder plugins are registered with an integer priority, but in