From 4a25acaad8fdfab894a7fe08b56b63646fbc02f9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 21 Sep 2010 12:00:45 -0600 Subject: [PATCH] Validation on `config.vm.boot_mode` --- lib/vagrant/config/vm.rb | 2 ++ templates/locales/en.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/vagrant/config/vm.rb b/lib/vagrant/config/vm.rb index 814534378cf..63e003a9441 100644 --- a/lib/vagrant/config/vm.rb +++ b/lib/vagrant/config/vm.rb @@ -103,6 +103,8 @@ def validate(errors) :path => options[:hostpath]) end end + + errors.add("vagrant.config.vm.boot_mode_invalid") if ![:vrdp, :gui].include?(boot_mode.to_sym) end end end diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 5e3b970a966..eb2c4a93774 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -101,6 +101,7 @@ en: private_key_missing: "`private_key_path` file must exist: %{path}" vm: shared_folder_hostpath_missing: "Shared folder host path for '%{name}' doesn't exist: %{path}" + boot_mode_invalid: "Boot mode must be one of: vrdp or gui" #------------------------------------------------------------------------------- # Translations for commands. e.g. `vagrant x`