communicators/winrm: silence warnings loading winrm
/cc @sneal - I silenced warnings using the built-in util. Also, can you see if we load here if that load error goes away?
This commit is contained in:
parent
b38876ac50
commit
47b5a3fcdb
|
@ -26,10 +26,18 @@ module VagrantPlugins
|
||||||
|
|
||||||
def self.init!
|
def self.init!
|
||||||
return if defined?(@_init)
|
return if defined?(@_init)
|
||||||
|
@_init = true
|
||||||
|
|
||||||
|
# Setup the I18n
|
||||||
I18n.load_path << File.expand_path(
|
I18n.load_path << File.expand_path(
|
||||||
"templates/locales/comm_winrm.yml", Vagrant.source_root)
|
"templates/locales/comm_winrm.yml", Vagrant.source_root)
|
||||||
I18n.reload!
|
I18n.reload!
|
||||||
@_init = true
|
|
||||||
|
# Load the WinRM gem
|
||||||
|
require "vagrant/util/silence_warnings"
|
||||||
|
Vagrant::Util::SilenceWarnings.silence! do
|
||||||
|
require "winrm"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
require "timeout"
|
require "timeout"
|
||||||
|
|
||||||
require "log4r"
|
require "log4r"
|
||||||
require "winrm"
|
|
||||||
|
|
||||||
require "vagrant/util/retryable"
|
require "vagrant/util/retryable"
|
||||||
|
require "vagrant/util/silence_warnings"
|
||||||
|
|
||||||
|
Vagrant::Util::SilenceWarnings.silence! do
|
||||||
|
require "winrm"
|
||||||
|
end
|
||||||
|
|
||||||
module VagrantPlugins
|
module VagrantPlugins
|
||||||
module CommunicatorWinRM
|
module CommunicatorWinRM
|
||||||
|
|
Loading…
Reference in New Issue