Check for empty chef_server_url and validation_key_path
This commit is contained in:
parent
6814f9c97d
commit
7e71d72db8
|
@ -38,10 +38,14 @@ module VagrantPlugins
|
|||
def validate(machine)
|
||||
errors = _detected_errors
|
||||
errors.concat(validate_base(machine))
|
||||
errors << I18n.t("vagrant.config.chef.server_url_empty") if \
|
||||
!chef_server_url || chef_server_url.strip == ""
|
||||
errors << I18n.t("vagrant.config.chef.validation_key_path") if \
|
||||
!validation_key_path
|
||||
|
||||
if chef_server_url.to_s.strip.empty?
|
||||
errors << I18n.t("vagrant.config.chef.server_url_empty")
|
||||
end
|
||||
|
||||
if validation_key_path.to_s.strip.empty?
|
||||
errors << I18n.t("vagrant.config.chef.validation_key_path")
|
||||
end
|
||||
|
||||
if delete_client || delete_node
|
||||
if !Vagrant::Util::Which.which("knife")
|
||||
|
|
Loading…
Reference in New Issue