mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-18 16:31:26 -07:00
* also uses LC_ALL to force language
* adjusted test_xfconf and test_cpanm
* added changelog fragment
* Update changelogs/fragments/2731-mh-cmd-locale.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
* adjusted chglog frag per PR
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 6a41fba2f8
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
6afde82f2c
commit
885bb73cc6
3 changed files with 24 additions and 18 deletions
|
@ -487,13 +487,16 @@ class CmdMixin(object):
|
|||
def run_command(self, extra_params=None, params=None, *args, **kwargs):
|
||||
self.vars.cmd_args = self._calculate_args(extra_params, params)
|
||||
options = dict(self.run_command_fixed_options)
|
||||
env_update = dict(options.get('environ_update', {}))
|
||||
options['check_rc'] = options.get('check_rc', self.check_rc)
|
||||
options.update(kwargs)
|
||||
env_update = dict(options.get('environ_update', {}))
|
||||
if self.force_lang:
|
||||
env_update.update({'LANGUAGE': self.force_lang})
|
||||
env_update.update({
|
||||
'LANGUAGE': self.force_lang,
|
||||
'LC_ALL': self.force_lang,
|
||||
})
|
||||
self.update_output(force_lang=self.force_lang)
|
||||
options['environ_update'] = env_update
|
||||
options.update(kwargs)
|
||||
rc, out, err = self.module.run_command(self.vars.cmd_args, *args, **options)
|
||||
self.update_output(rc=rc, stdout=out, stderr=err)
|
||||
return self.process_command_output(rc, out, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue