command runner: prefer term allowlist
This commit is contained in:
parent
407d87d8bb
commit
d4e755c0e9
|
@ -27,7 +27,7 @@ class LoggedCommandRunner:
|
|||
def __init__(self, ident,
|
||||
*, use_systemd_user: Optional[bool] = None) -> None:
|
||||
self.ident = ident
|
||||
self.env_whitelist = [
|
||||
self.env_allowlist = [
|
||||
"PATH", "PYTHONPATH",
|
||||
"PYTHON",
|
||||
"TARGET_MOUNT_POINT",
|
||||
|
@ -58,7 +58,7 @@ class LoggedCommandRunner:
|
|||
# --pipe also opens a pipe on stdin. This will effectively make the
|
||||
# child process behave differently if it reads from stdin.
|
||||
prefix.append("--pipe")
|
||||
for key in self.env_whitelist:
|
||||
for key in self.env_allowlist:
|
||||
with suppress(KeyError):
|
||||
prefix.extend(("--setenv", f"{key}={os.environ[key]}"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue