From 2030de06a0b28af3ee5d13caf39e0bd782c7b450 Mon Sep 17 00:00:00 2001 From: Levente Polyak Date: Tue, 9 Nov 2021 00:25:50 +0100 Subject: [PATCH] fix(keyringctl): set HOME, PATH, LANG required for hokey This effectively requires en_US.UTF-8 to be an available lang, which is a relative fair requirement and mandatory to set for hokey. --- libkeyringctl/util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libkeyringctl/util.py b/libkeyringctl/util.py index 99455ac..f57c7ce 100644 --- a/libkeyringctl/util.py +++ b/libkeyringctl/util.py @@ -4,6 +4,7 @@ from collections.abc import Iterable from collections.abc import Iterator from contextlib import contextmanager from os import chdir +from os import environ from os import getcwd from pathlib import Path from re import split @@ -110,7 +111,7 @@ def system( The output of cmd """ if not env: - env = {} + env = {"HOME": environ["HOME"], "PATH": environ["PATH"], "LANG": "en_US.UTF-8"} try: return check_output(cmd, stderr=STDOUT, stdin=_stdin, env=env).decode()