Ensure opts get passed to privledge execute
This commit is contained in:
parent
b29b37af0d
commit
773276ba37
@ -122,7 +122,7 @@ module VagrantPlugins
|
|||||||
end
|
end
|
||||||
|
|
||||||
def download(req, ctx)
|
def download(req, ctx)
|
||||||
logger.debug("Uploading")
|
logger.debug("Downloading")
|
||||||
with_info(ctx) do |info|
|
with_info(ctx) do |info|
|
||||||
plugin_name = info.plugin_name
|
plugin_name = info.plugin_name
|
||||||
logger.debug("Got plugin #{plugin_name}")
|
logger.debug("Got plugin #{plugin_name}")
|
||||||
@ -176,22 +176,14 @@ module VagrantPlugins
|
|||||||
with_info(ctx) do |info|
|
with_info(ctx) do |info|
|
||||||
plugin_name = info.plugin_name
|
plugin_name = info.plugin_name
|
||||||
|
|
||||||
# Need to specifically now use funcspec map since the funcspec map
|
to, machine, from = mapper.funcspec_map(
|
||||||
# will inject results into the mappers. This causes duplicate values
|
req, mapper, broker,
|
||||||
# to come up for arguments of the same type
|
expect: [Vagrant::Machine, String, String]
|
||||||
expected_types = [Client::Target::Machine, String, String]
|
)
|
||||||
to, target, from = req.args.map do |r|
|
logger.debug("Got machine #{machine}")
|
||||||
logger.debug("mapping #{r}")
|
|
||||||
mapper.map(r, expected_types.shift)
|
|
||||||
end
|
|
||||||
logger.debug("Got target #{target}")
|
|
||||||
logger.debug("Got to #{to}")
|
logger.debug("Got to #{to}")
|
||||||
logger.debug("Got from #{from}")
|
logger.debug("Got from #{from}")
|
||||||
|
|
||||||
project = target.project
|
|
||||||
env = Vagrant::Environment.new({client: project})
|
|
||||||
machine = env.machine(target.name.to_sym, target.provider_name.to_sym)
|
|
||||||
|
|
||||||
plugin = Vagrant.plugin("2").manager.communicators[plugin_name.to_s.to_sym]
|
plugin = Vagrant.plugin("2").manager.communicators[plugin_name.to_s.to_sym]
|
||||||
logger.debug("Got plugin #{plugin}")
|
logger.debug("Got plugin #{plugin}")
|
||||||
communicator = plugin.new(machine)
|
communicator = plugin.new(machine)
|
||||||
@ -284,6 +276,7 @@ module VagrantPlugins
|
|||||||
|
|
||||||
plugin = Vagrant.plugin("2").manager.communicators[plugin_name.to_s.to_sym]
|
plugin = Vagrant.plugin("2").manager.communicators[plugin_name.to_s.to_sym]
|
||||||
communicator = plugin.new(machine)
|
communicator = plugin.new(machine)
|
||||||
|
opts.transform_keys!(&:to_sym)
|
||||||
exit_code = communicator.sudo(cmd.command, opts)
|
exit_code = communicator.sudo(cmd.command, opts)
|
||||||
logger.debug("command exit code: #{exit_code}")
|
logger.debug("command exit code: #{exit_code}")
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user