run_file path validation for CFEngine
This commit is contained in:
parent
ba2c749d6d
commit
b279f222a2
|
@ -91,6 +91,13 @@ module VagrantPlugins
|
||||||
errors << I18n.t("vagrant.cfengine_config.classes_array")
|
errors << I18n.t("vagrant.cfengine_config.classes_array")
|
||||||
end
|
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 }
|
{ "CFEngine" => errors }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -24,6 +24,8 @@ en:
|
||||||
The mode must be 'bootstrap' or 'single_run'
|
The mode must be 'bootstrap' or 'single_run'
|
||||||
policy_server_address: |-
|
policy_server_address: |-
|
||||||
The policy server address must be set for bootstrapping.
|
The policy server address must be set for bootstrapping.
|
||||||
|
run_file_not_found: |-
|
||||||
|
The 'run_file' specified could not be found.
|
||||||
|
|
||||||
general:
|
general:
|
||||||
batch_unexpected_error: |-
|
batch_unexpected_error: |-
|
||||||
|
|
Loading…
Reference in New Issue