From 3edc923b2286247b55b972cc2f2ba8a8f03fac53 Mon Sep 17 00:00:00 2001 From: Paulo Bittencourt Date: Mon, 18 Nov 2013 12:34:16 -0500 Subject: [PATCH] use rbconfig for detecting Windows --- lib/vagrant-hostmanager/hosts_file.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/vagrant-hostmanager/hosts_file.rb b/lib/vagrant-hostmanager/hosts_file.rb index d7a2e58..71b4e05 100644 --- a/lib/vagrant-hostmanager/hosts_file.rb +++ b/lib/vagrant-hostmanager/hosts_file.rb @@ -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?