From d613ffe37c35f8aae8fd938e63d98363b4bd7027 Mon Sep 17 00:00:00 2001 From: Jerry Date: Mon, 22 Jan 2024 23:38:01 +0800 Subject: [PATCH] also set LC_ALL --- src/pacroller/main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pacroller/main.py b/src/pacroller/main.py index 7dafecb..aee094e 100644 --- a/src/pacroller/main.py +++ b/src/pacroller/main.py @@ -258,14 +258,17 @@ def main() -> None: ) locales = [l.lower() for l in p.stdout.strip().split('\n')] preferred = ['en_US.UTF-8', 'C.UTF-8'] + env_vars = ['LANG', 'LC_ALL'] for l in preferred: if l.lower() in locales: logger.debug(f'using locale {l}') - environ['LANG'] = l + for env_var in env_vars: + environ[env_var] = l break else: logger.debug('using fallback locale C') - environ['LANG'] = 'C' + for env_var in env_vars: + environ[env_var] = 'C' def clear_pkg_cache() -> None: logger.debug('clearing package cache') for i in Path(PACMAN_PKG_DIR).iterdir():