Try to run sudo with a new shell.

This commit is contained in:
Antoine Nguyen
2015-10-23 10:28:31 +02:00
parent 64f0eb6a62
commit 54f5433949

View File

@@ -42,7 +42,7 @@ def exec_cmd(cmd, sudo_user=None, pinput=None, **kwargs):
"""
sudo_user = ENV.get("sudo_user", sudo_user)
if sudo_user is not None:
cmd = "sudo -u %s %s" % (sudo_user, cmd)
cmd = "sudo -i %s %s" % (sudo_user, cmd)
if "shell" not in kwargs:
kwargs["shell"] = True
if pinput is not None: