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?