docker: use Kernel.system for docker-exec when -t is given

This commit is contained in:
Isaac Freeman 2018-04-18 17:50:47 -04:00
parent e6887b8305
commit de71626922
1 changed files with 12 additions and 9 deletions

View File

@ -84,8 +84,10 @@ 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]
if options[:pty]
Kernel.system(*exec_cmd)
else
output = "" output = ""
machine.provider.driver.execute(*exec_cmd, exec_options) do |type, data| machine.provider.driver.execute(*exec_cmd, exec_options) do |type, data|
output += data output += data
@ -102,3 +104,4 @@ module VagrantPlugins
end end
end end
end end
end