mirror of
https://github.com/isjerryxiao/pacroller.git
synced 2024-11-22 15:50:43 +08:00
also set LC_ALL
This commit is contained in:
parent
5e7e69f0d8
commit
d613ffe37c
1 changed files with 5 additions and 2 deletions
|
@ -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():
|
||||
|
|
Loading…
Reference in a new issue