Ensure guest name is a string

This commit is contained in:
Brian Cain 2018-03-28 16:59:41 -07:00
parent 76418b9fcd
commit 6373441ab2
No known key found for this signature in database
GPG Key ID: 43D51080D357A001
2 changed files with 4 additions and 2 deletions

View File

@ -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,

View File

@ -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