Move location of command validator
This commit is contained in:
parent
6cbb5d8e5d
commit
abb6d77442
|
@ -136,6 +136,11 @@ module VagrantPlugins
|
||||||
commands.push(key)
|
commands.push(key)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if !commands.include?(@command)
|
||||||
|
machine.ui.warn(I18n.t("vagrant.config.triggers.bad_command_warning",
|
||||||
|
cmd: @command))
|
||||||
|
end
|
||||||
|
|
||||||
# TODO: Does it make sense to strip out the "shell provisioner" error key here?
|
# TODO: Does it make sense to strip out the "shell provisioner" error key here?
|
||||||
# We could add more context around triggers?
|
# We could add more context around triggers?
|
||||||
if @run
|
if @run
|
||||||
|
@ -148,11 +153,6 @@ module VagrantPlugins
|
||||||
errors.concat errorz["shell provisioner"] if !errorz.empty?
|
errors.concat errorz["shell provisioner"] if !errorz.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
if !commands.include?(@command)
|
|
||||||
machine.ui.warn(I18n.t("vagrant.config.triggers.bad_command_warning",
|
|
||||||
cmd: @command))
|
|
||||||
end
|
|
||||||
|
|
||||||
if !@name.nil? && !@name.is_a?(String)
|
if !@name.nil? && !@name.is_a?(String)
|
||||||
errors << I18n.t("vagrant.config.triggers.name_bad_type", cmd: @command)
|
errors << I18n.t("vagrant.config.triggers.name_bad_type", cmd: @command)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue