feat: Passing HOME env var through to python workers (#3092)

* feat: Allow passing through certain environment variables

* Lookup the env vars on startup

* Faceplam

* Update python_executor.rs
This commit is contained in:
Audrius Butkevicius
2024-01-27 15:49:29 +01:00
committed by GitHub
parent a5d25362db
commit ec911f6a5a
@@ -54,7 +54,7 @@ use crate::{
create_args_and_out_file, get_reserved_variables, handle_child, read_result, set_logs,
start_child_process, write_file,
},
AuthedClientBackgroundTask, DISABLE_NSJAIL, DISABLE_NUSER, HTTPS_PROXY, HTTP_PROXY,
AuthedClientBackgroundTask, DISABLE_NSJAIL, DISABLE_NUSER, HOME_ENV, HTTPS_PROXY, HTTP_PROXY,
LOCK_CACHE_DIR, NO_PROXY, NSJAIL_PATH, PATH_ENV, PIP_CACHE_DIR, PIP_EXTRA_INDEX_URL, TZ_ENV,
};
@@ -371,6 +371,7 @@ mount {{
.env("PATH", PATH_ENV.as_str())
.env("TZ", TZ_ENV.as_str())
.env("BASE_INTERNAL_URL", base_internal_url)
.env("HOME", HOME_ENV.as_str())
.args(vec!["-u", "-m", "wrapper"])
.stdout(Stdio::piped())
.stderr(Stdio::piped());