use rbconfig for detecting Windows

This commit is contained in:
Paulo Bittencourt 2013-11-18 12:34:16 -05:00 committed by Paulo Bittencourt
parent d2b2e00939
commit 3edc923b22
1 changed files with 3 additions and 1 deletions

View File

@ -129,8 +129,10 @@ module VagrantPlugins
## Windows support for copying files, requesting elevated privileges if necessary
module WindowsSupport
require 'rbconfig'
def self.windows?
ENV['OS'] === 'Windows_NT'
RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
end
require 'win32ole' if windows?