Add validation to args for shell provisioner
This commit is contained in:
parent
bf32fb4de8
commit
14d1b987ae
|
@ -39,6 +39,11 @@ module Vagrant
|
||||||
if !upload_path
|
if !upload_path
|
||||||
errors.add(I18n.t("vagrant.provisioners.shell.upload_path_not_set"))
|
errors.add(I18n.t("vagrant.provisioners.shell.upload_path_not_set"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# If there are args and its not a string, that is a problem
|
||||||
|
if args && !args.is_a?(String)
|
||||||
|
errors.add(I18n.t("vagrant.provisioners.shell.args_not_string"))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -509,6 +509,7 @@ en:
|
||||||
running_puppetd: "Running Puppet agent..."
|
running_puppetd: "Running Puppet agent..."
|
||||||
|
|
||||||
shell:
|
shell:
|
||||||
|
args_not_string: "Shell provisioner `args` must be a string."
|
||||||
path_and_inline_set: "Only one of `path` or `inline` may be set."
|
path_and_inline_set: "Only one of `path` or `inline` may be set."
|
||||||
no_path_or_inline: "One of `path` or `inline` must be set."
|
no_path_or_inline: "One of `path` or `inline` must be set."
|
||||||
path_invalid: "`path` for shell provisioner does not exist on the host system: %{path}"
|
path_invalid: "`path` for shell provisioner does not exist on the host system: %{path}"
|
||||||
|
|
Loading…
Reference in New Issue