docker: use Kernel.system for docker-exec when -t is given
This commit is contained in:
parent
e6887b8305
commit
de71626922
|
@ -84,18 +84,21 @@ module VagrantPlugins
|
||||||
|
|
||||||
# Run this interactively if asked.
|
# Run this interactively if asked.
|
||||||
exec_options = options
|
exec_options = options
|
||||||
exec_options[:stdin] = true if options[:pty]
|
|
||||||
|
|
||||||
output = ""
|
if options[:pty]
|
||||||
machine.provider.driver.execute(*exec_cmd, exec_options) do |type, data|
|
Kernel.system(*exec_cmd)
|
||||||
output += data
|
else
|
||||||
end
|
output = ""
|
||||||
|
machine.provider.driver.execute(*exec_cmd, exec_options) do |type, data|
|
||||||
|
output += data
|
||||||
|
end
|
||||||
|
|
||||||
output_options = {}
|
output_options = {}
|
||||||
output_options[:prefix] = false if !options[:prefix]
|
output_options[:prefix] = false if !options[:prefix]
|
||||||
|
|
||||||
if !output.empty?
|
if !output.empty?
|
||||||
machine.ui.output(output.chomp, **output_options)
|
machine.ui.output(output.chomp, **output_options)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue