diff --git a/lib/vagrant/machine.rb b/lib/vagrant/machine.rb index 7dd643434..ce2278b3b 100644 --- a/lib/vagrant/machine.rb +++ b/lib/vagrant/machine.rb @@ -160,7 +160,7 @@ module Vagrant # as extra data set on the environment hash for the middleware # runner. def action(name, opts=nil) - @triggers.fire_before_triggers(name, @name) + @triggers.fire_before_triggers(name, @name.to_s) @logger.info("Calling action: #{name} on provider #{@provider}") opts ||= {} @@ -206,7 +206,7 @@ module Vagrant action_result end - @triggers.fire_after_triggers(name, @name) + @triggers.fire_after_triggers(name, @name.to_s) rescue Errors::EnvironmentLockedError raise Errors::MachineActionLockedError, action: name, diff --git a/lib/vagrant/plugin/v2/trigger.rb b/lib/vagrant/plugin/v2/trigger.rb index 39644725d..e6e73f528 100644 --- a/lib/vagrant/plugin/v2/trigger.rb +++ b/lib/vagrant/plugin/v2/trigger.rb @@ -71,6 +71,8 @@ module Vagrant # @param [Array] triggers An array of triggers to be filtered # @return [Array] The filtered array of triggers def filter_triggers(triggers, guest_name) + binding.pry + # look for only_on triggers and if it doesn't match guest name, throw it away return triggers end