Pass along provider to environment.target

Mirrors change in https://github.com/hashicorp/vagrant-plugin-sdk/pull/157
This commit is contained in:
Paul Hinze 2022-05-16 16:29:11 -05:00
parent 52ed086644
commit e605132321
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0
2 changed files with 4 additions and 3 deletions

View File

@ -108,9 +108,10 @@ module Vagrant
# Gets a target (machine) by name
#
# @param [String] machine name
# @param [String] provider name
# return [VagrantPlugins::CommandServe::Client::Machine]
def get_target(name)
client.target(name)
def get_target(name, provider)
client.target(name, provider)
end
# Returns the host object associated with this environment.

View File

@ -30,7 +30,7 @@ module Vagrant
@logger = Log4r::Logger.new("vagrant::machine")
if !env.nil? && client.nil?
@env = env
@client = env.get_target(name)
@client = env.get_target(name, provider_name)
else
@client = client
@env = client.environment