Eager load WinRM

/cc @sneal - How is this? It is dirty, but at least then it doesn't have
a global performance impact on Vagrant if you're not using WinRM
This commit is contained in:
Mitchell Hashimoto 2014-04-09 11:36:52 -07:00
parent e51c5530d7
commit d608e0bdfd
1 changed files with 7 additions and 0 deletions

View File

@ -128,6 +128,13 @@ module Vagrant
# state we setup on this machine. # state we setup on this machine.
@provider = provider_cls.new(self) @provider = provider_cls.new(self)
@provider._initialize(@provider_name, self) @provider._initialize(@provider_name, self)
# If we're using WinRM, we eager load the plugin because of
# GH-3390
if @config.vm.communicator == :winrm
@logger.debug("Eager loading WinRM communicator to avoid GH-3390")
communiate
end
end end
# This calls an action on the provider. The provider may or may not # This calls an action on the provider. The provider may or may not