{"record":{"id":"492e230a2028ef6f","repo":"hashicorp/vagrant","slug":"the-command-cmd-was-not-found-for-this-trigge","errorCode":null,"errorMessage":"The command '%{cmd}' was not found for this trigger.","messagePattern":"The command '%(.+?)' was not found for this trigger\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"plugins/kernel_v2/config/vm_trigger.rb","lineNumber":228,"sourceCode":"        end\n      end\n\n      # @return [Array] array of strings of error messages from config option validation\n      def validate(machine)\n        errors = _detected_errors\n\n        if @type && !VALID_TRIGGER_TYPES.include?(@type)\n          errors << I18n.t(\"vagrant.config.triggers.bad_trigger_type\",\n                           type: @type,\n                           trigger: @command,\n                           types: VALID_TRIGGER_TYPES.join(', '))\n        end\n\n        if @type == :command || !@type\n          commands = Vagrant.plugin(\"2\").manager.commands.keys.map(&:to_s)\n\n          if !commands.include?(@command) && @command != :all\n            machine.ui.warn(I18n.t(\"vagrant.config.triggers.bad_command_warning\",\n                                  cmd: @command))\n          end\n        end\n\n        if @run\n          errorz = @run.validate(machine)\n          errors.concat errorz[\"shell provisioner\"] if !errorz.empty?\n\n          if @run.privileged == true\n            machine.ui.warn(I18n.t(\"vagrant.config.triggers.privileged_ignored\",\n                                  command: @command))\n          end\n\n          if @run.powershell_args != \"\"\n            machine.ui.warn(I18n.t(\"vagrant.config.triggers.powershell_args_ignored\"))\n          end\n        end\n","sourceCodeStart":210,"sourceCodeEnd":246,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/kernel_v2/config/vm_trigger.rb#L210-L246","documentation":"A trigger scoped to a command (type :command or unset) checks its @command string against the registered command names from Vagrant.plugin(\"2\").manager.commands.keys. If it matches none and is not :all, this warning prints during config validation; the trigger simply never fires for any command.","triggerScenarios":"A Vagrantfile with `config.trigger.after :prvoision do ... end` (typo of provision), or a trigger referencing a command provided by a plugin that is not installed, so the name is absent from the registered commands map.","commonSituations":"Typos in command symbols; referencing plugin commands without the plugin installed; command renames across Vagrant versions.","solutions":["Correct the command name to a registered command; run `vagrant list-commands` to see valid names","Install the plugin that provides the command you reference in the trigger","Use `:all` instead of a command name if the trigger should fire for every command"],"exampleFix":"# before\nconfig.trigger.after :prvoision do |t|\n  t.run = { inline: \"echo done\" }\nend\n# after\nconfig.trigger.after :provision do |t|\n  t.run = { inline: \"echo done\" }\nend","handlingStrategy":"type-guard","validationCode":"# Tooling: assert trigger commands are registered\nvalid = Vagrant.plugin(\"2\").manager.commands.keys.map(&:to_s)\ntrigger_cmds.each { |c| warn \"unknown command #{c}\" unless valid.include?(c.to_s) || c.to_s == \"all\" }","typeGuard":"known_command = ->(cmd) { Vagrant.plugin(\"2\").manager.commands.keys.map(&:to_s).include?(cmd.to_s) || cmd.to_s == \"all\" }","tryCatchPattern":null,"preventionTips":["Cross-check trigger command symbols against `vagrant list-commands`","Install plugins before referencing their commands in triggers","Prefer :all over guessed names when in doubt"],"tags":["vagrant","triggers","command-name","typo"],"backgroundTag":"unknown-command-reference","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}