Verify we have errors to show if we're going to show them

This commit is contained in:
Mitchell Hashimoto 2013-01-18 13:37:31 -08:00
parent 58eac7117b
commit ffd9c1eb9c
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ module Vagrant
if !env.has_key?(:config_validate) || env[:config_validate] if !env.has_key?(:config_validate) || env[:config_validate]
errors = env[:machine].config.validate(env[:machine]) errors = env[:machine].config.validate(env[:machine])
if errors if errors && !errors.empty?
raise Errors::ConfigInvalid, raise Errors::ConfigInvalid,
:errors => Util::TemplateRenderer.render( :errors => Util::TemplateRenderer.render(
"config/validation_failed", "config/validation_failed",