From 6373441ab21da5b57b71ce2001c9fabb7dfd6285 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Wed, 28 Mar 2018 16:59:41 -0700 Subject: [PATCH] Ensure guest name is a string --- lib/vagrant/machine.rb | 4 ++-- lib/vagrant/plugin/v2/trigger.rb | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) 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