diff --git a/lib/vagrant.rb b/lib/vagrant.rb index 46c8cb190..1b0982d25 100644 --- a/lib/vagrant.rb +++ b/lib/vagrant.rb @@ -137,10 +137,11 @@ Vagrant.config_keys.register(:package) { Vagrant::Config::PackageConfig } # Register the built-in hosts Vagrant.hosts.register(:arch) { Vagrant::Hosts::Arch } -Vagrant.hosts.register(:freebsd) { Vagrant::Hosts::FreeBSD } -Vagrant.hosts.register(:fedora) { Vagrant::Hosts::Fedora } -Vagrant.hosts.register(:linux) { Vagrant::Hosts::Linux } Vagrant.hosts.register(:bsd) { Vagrant::Hosts::BSD } +Vagrant.hosts.register(:fedora) { Vagrant::Hosts::Fedora } +Vagrant.hosts.register(:freebsd) { Vagrant::Hosts::FreeBSD } +Vagrant.hosts.register(:linux) { Vagrant::Hosts::Linux } +Vagrant.hosts.register(:windows) { Vagrant::Hosts::Windows } # Register the built-in guests Vagrant.guests.register(:arch) { Vagrant::Guest::Arch } diff --git a/lib/vagrant/hosts.rb b/lib/vagrant/hosts.rb index 9ed48239f..b58d7e303 100644 --- a/lib/vagrant/hosts.rb +++ b/lib/vagrant/hosts.rb @@ -1,11 +1,12 @@ module Vagrant module Hosts - autoload :Base, 'vagrant/hosts/base' - autoload :Arch, 'vagrant/hosts/arch' - autoload :BSD, 'vagrant/hosts/bsd' - autoload :FreeBSD,'vagrant/hosts/freebsd' - autoload :Fedora, 'vagrant/hosts/fedora' - autoload :Linux, 'vagrant/hosts/linux' + autoload :Base, 'vagrant/hosts/base' + autoload :Arch, 'vagrant/hosts/arch' + autoload :BSD, 'vagrant/hosts/bsd' + autoload :FreeBSD, 'vagrant/hosts/freebsd' + autoload :Fedora, 'vagrant/hosts/fedora' + autoload :Linux, 'vagrant/hosts/linux' + autoload :Windows, 'vagrant/hosts/windows' # This method detects the correct host based on the `match?` methods # implemented in the registered hosts. diff --git a/lib/vagrant/hosts/windows.rb b/lib/vagrant/hosts/windows.rb new file mode 100644 index 000000000..3f2afffef --- /dev/null +++ b/lib/vagrant/hosts/windows.rb @@ -0,0 +1,16 @@ +require 'vagrant/util/platform' + +module Vagrant + module Hosts + class Windows < Base + def self.match? + Util::Platform.windows? + end + + # Windows does not support NFS + def nfs? + false + end + end + end +end