use rbconfig for detecting Windows
This commit is contained in:
parent
d2b2e00939
commit
3edc923b22
|
@ -129,8 +129,10 @@ module VagrantPlugins
|
||||||
|
|
||||||
## Windows support for copying files, requesting elevated privileges if necessary
|
## Windows support for copying files, requesting elevated privileges if necessary
|
||||||
module WindowsSupport
|
module WindowsSupport
|
||||||
|
require 'rbconfig'
|
||||||
|
|
||||||
def self.windows?
|
def self.windows?
|
||||||
ENV['OS'] === 'Windows_NT'
|
RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'win32ole' if windows?
|
require 'win32ole' if windows?
|
||||||
|
|
Loading…
Reference in New Issue