From b92bfe2f2b954003aec4dea711b75c3a670fe83e Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Tue, 1 Oct 2019 13:04:20 -0300 Subject: [PATCH] root subprocesses not using custom generated environment --- bauh/commons/system.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bauh/commons/system.py b/bauh/commons/system.py index 3990a5aa..ab37903f 100644 --- a/bauh/commons/system.py +++ b/bauh/commons/system.py @@ -210,7 +210,8 @@ def new_root_subprocess(cmd: List[str], root_password: str, cwd: str = '.', pwdin = new_subprocess(['echo', root_password], global_interpreter=global_interpreter, lang=lang).stdout final_cmd.extend(cmd) - return subprocess.Popen(final_cmd, stdin=pwdin, stdout=PIPE, stderr=PIPE, cwd=cwd) + + return subprocess.Popen(final_cmd, stdin=pwdin, stdout=PIPE, stderr=PIPE, cwd=cwd, env=gen_env(global_interpreter, lang)) def notify_user(msg: str, app_name: str, icon_path: str):