Display warning if vagrant command for trigger is not found
This commit is contained in:
parent
8e72ae5bd6
commit
60ff2489c4
|
@ -113,6 +113,17 @@ module VagrantPlugins
|
||||||
def validate(machine)
|
def validate(machine)
|
||||||
errors = _detected_errors
|
errors = _detected_errors
|
||||||
|
|
||||||
|
commands = []
|
||||||
|
# TODO: Should this be cached...?
|
||||||
|
Vagrant.plugin("2").manager.commands.each do |key,data|
|
||||||
|
commands.push(key)
|
||||||
|
end
|
||||||
|
|
||||||
|
if !commands.include?(@command)
|
||||||
|
machine.ui.warn(I18n.t("vagrant.config.triggers.bad_command_warning",
|
||||||
|
cmd: @command))
|
||||||
|
end
|
||||||
|
|
||||||
if !@run.nil?
|
if !@run.nil?
|
||||||
if !@run.is_a?(Hash)
|
if !@run.is_a?(Hash)
|
||||||
# Run must be a hash
|
# Run must be a hash
|
||||||
|
|
|
@ -1678,6 +1678,8 @@ en:
|
||||||
The key `paranoid` is deprecated. Please use `verify_host_key`. Supported
|
The key `paranoid` is deprecated. Please use `verify_host_key`. Supported
|
||||||
values are exactly the same, only the name of the option has changed.
|
values are exactly the same, only the name of the option has changed.
|
||||||
triggers:
|
triggers:
|
||||||
|
bad_command_warning: |-
|
||||||
|
The command '%{cmd}' was not found for this trigger.
|
||||||
name_bad_type: |-
|
name_bad_type: |-
|
||||||
Invalid type set for `name` on trigger for command '%{cmd}'. `name` should be a String.
|
Invalid type set for `name` on trigger for command '%{cmd}'. `name` should be a String.
|
||||||
on_error_bad_type: |-
|
on_error_bad_type: |-
|
||||||
|
|
Loading…
Reference in New Issue