Skip to content

Commit 3edc923

Browse files
Paulo Bittencourtpbitty
authored andcommitted
use rbconfig for detecting Windows
1 parent d2b2e00 commit 3edc923

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/vagrant-hostmanager/hosts_file.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,10 @@ def get_machines
129129

130130
## Windows support for copying files, requesting elevated privileges if necessary
131131
module WindowsSupport
132+
require 'rbconfig'
133+
132134
def self.windows?
133-
ENV['OS'] === 'Windows_NT'
135+
RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
134136
end
135137

136138
require 'win32ole' if windows?

0 commit comments

Comments
 (0)