Re-enable using local provider from machine

This commit is contained in:
Chris Roberts 2022-02-14 16:43:37 -08:00 committed by Paul Hinze
parent 9a6f5fa316
commit bcff6d6284
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -32,6 +32,15 @@ module Vagrant
@env = env
@ui = Vagrant::UI::Prefixed.new(@env.ui, name)
if Vagrant.server_mode?
local_plugin = Vagrant.plugin("2").local_manager.providers[provider_name]
if local_plugin
@logger.info("Replacing provider with local plugin; was #{provider_cls}; now #{local_plugin[0]}")
provider_cls = local_plugin[0]
provider_options = local_plugin[1]
end
end
# TODO: Get provider info from client
@provider_name = provider_name
@provider = provider_cls.new(self)