[PR #11773/8fbb43e6 backport][stable-12] Ensure standard locale in run_command (group5-batch2) (#11806)

Ensure standard locale in run_command (group5-batch2) (#11773)

* ensure standard locale in run_command (group5-batch2)

Adds ``LANGUAGE=C`` and ``LC_ALL=C`` to ``run_command()`` calls in modules
that parse command output, to prevent locale-dependent parsing failures on
non-C-locale systems.

Modules updated: cronvar, dnf_versionlock, dpkg_divert, flatpak_remote, hg.



* add changelog fragment for group5-batch2



---------


(cherry picked from commit 8fbb43e660)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
patchback[bot]
2026-04-12 22:29:04 +02:00
committed by GitHub
parent 150f63b36b
commit 3ef5b36066
6 changed files with 11 additions and 0 deletions

View File

@@ -199,6 +199,7 @@ def main():
# This module supports check mode
supports_check_mode=True,
)
module.run_command_environ_update = {"LANGUAGE": "C", "LC_ALL": "C"}
name = module.params["name"]
flatpakrepo_url = module.params["flatpakrepo_url"]