run_file path validation for CFEngine

This commit is contained in:
Mitchell Hashimoto 2013-04-08 15:02:33 -07:00
parent ba2c749d6d
commit b279f222a2
2 changed files with 9 additions and 0 deletions

View File

@ -91,6 +91,13 @@ module VagrantPlugins
errors << I18n.t("vagrant.cfengine_config.classes_array")
end
if @run_file
expanded = Pathname.new(@run_file).expand_path(machine.env.root_path)
if !expanded.file?
errors << I18n.t("vagrant.cfengine_config.run_file_not_found")
end
end
{ "CFEngine" => errors }
end
end

View File

@ -24,6 +24,8 @@ en:
The mode must be 'bootstrap' or 'single_run'
policy_server_address: |-
The policy server address must be set for bootstrapping.
run_file_not_found: |-
The 'run_file' specified could not be found.
general:
batch_unexpected_error: |-