Move location of command validator
This commit is contained in:
parent
6cbb5d8e5d
commit
abb6d77442
|
@ -136,6 +136,11 @@ module VagrantPlugins
|
|||
commands.push(key)
|
||||
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?
|
||||
# We could add more context around triggers?
|
||||
if @run
|
||||
|
@ -148,11 +153,6 @@ module VagrantPlugins
|
|||
errors.concat errorz["shell provisioner"] if !errorz.empty?
|
||||
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)
|
||||
errors << I18n.t("vagrant.config.triggers.name_bad_type", cmd: @command)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue