mirror of
https://github.com/ansible/ansible.git
synced 2026-08-01 00:34:56 +02:00
Set LANGUAGE env variable is set to a non-English locale (#83671)
Fixes: #83608 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
---
|
||||
bugfixes:
|
||||
- Set LANGUAGE environment variable is set to a non-English locale (https://github.com/ansible/ansible/issues/83608).
|
||||
@@ -1252,6 +1252,7 @@ def main():
|
||||
LC_ALL=locale,
|
||||
LC_MESSAGES=locale,
|
||||
LC_CTYPE=locale,
|
||||
LANGUAGE=locale,
|
||||
)
|
||||
module.run_command_environ_update = APT_ENV_VARS
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ def lang_env(module):
|
||||
|
||||
if not hasattr(lang_env, 'result'):
|
||||
locale = get_best_parsable_locale(module)
|
||||
lang_env.result = dict(LANG=locale, LC_ALL=locale, LC_MESSAGES=locale)
|
||||
lang_env.result = dict(LANG=locale, LC_ALL=locale, LC_MESSAGES=locale, LANGUAGE=locale)
|
||||
|
||||
return lang_env.result
|
||||
|
||||
|
||||
@@ -504,7 +504,7 @@ class UbuntuSourcesList(SourcesList):
|
||||
|
||||
if self.apt_key_bin:
|
||||
locale = get_best_parsable_locale(self.module)
|
||||
APT_ENV = dict(LANG=locale, LC_ALL=locale, LC_MESSAGES=locale, LC_CTYPE=locale)
|
||||
APT_ENV = dict(LANG=locale, LC_ALL=locale, LC_MESSAGES=locale, LC_CTYPE=locale, LANGUAGE=locale)
|
||||
self.module.run_command_environ_update = APT_ENV
|
||||
rc, out, err = self.module.run_command([self.apt_key_bin, 'export', key_fingerprint], check_rc=True)
|
||||
found = bool(not err or 'nothing exported' not in err)
|
||||
|
||||
@@ -68,7 +68,7 @@ def main():
|
||||
dpkg = module.get_bin_path('dpkg', True)
|
||||
|
||||
locale = get_best_parsable_locale(module)
|
||||
DPKG_ENV = dict(LANG=locale, LC_ALL=locale, LC_MESSAGES=locale, LC_CTYPE=locale)
|
||||
DPKG_ENV = dict(LANG=locale, LC_ALL=locale, LC_MESSAGES=locale, LC_CTYPE=locale, LANGUAGE=locale)
|
||||
module.run_command_environ_update = DPKG_ENV
|
||||
|
||||
name = module.params['name']
|
||||
|
||||
Reference in New Issue
Block a user