Update wrapper initializer to use client from manager

This commit is contained in:
Chris Roberts 2022-02-10 10:43:44 -08:00 committed by Paul Hinze
parent 3d05ff7ce0
commit 0cf2ea2eb6
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -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