communicators/ssh: add -E to sudo to preserve env
This commit is contained in:
parent
26b74d3295
commit
9cd9e6e55d
|
@ -285,7 +285,7 @@ module VagrantPlugins
|
||||||
# need to wrap the shell in a `sudo` call.
|
# need to wrap the shell in a `sudo` call.
|
||||||
shell_cmd = @machine.config.ssh.shell
|
shell_cmd = @machine.config.ssh.shell
|
||||||
shell_cmd = shell if shell
|
shell_cmd = shell if shell
|
||||||
shell_cmd = "sudo -H #{shell_cmd}" if sudo
|
shell_cmd = "sudo -E -H #{shell_cmd}" if sudo
|
||||||
|
|
||||||
# Open the channel so we can execute or command
|
# Open the channel so we can execute or command
|
||||||
channel = connection.open_channel do |ch|
|
channel = connection.open_channel do |ch|
|
||||||
|
|
Loading…
Reference in New Issue