diff --git a/plugins/kernel_v2/config/vm_trigger.rb b/plugins/kernel_v2/config/vm_trigger.rb index c0220f4ea..5ce358431 100644 --- a/plugins/kernel_v2/config/vm_trigger.rb +++ b/plugins/kernel_v2/config/vm_trigger.rb @@ -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