1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Since we screenscrape output from git to tell us information we need to use the C locale when running commands.

Using another locale would mean that we get information that may have
the strings that we are looking for.

Fixes #2449
Fixes #2462
This commit is contained in:
Toshio Kuratomi 2016-02-07 12:46:41 -08:00 committed by Matt Clay
parent de082490db
commit f8f84f0491

View file

@ -698,6 +698,10 @@ def main():
key_file = module.params['key_file'] key_file = module.params['key_file']
ssh_opts = module.params['ssh_opts'] ssh_opts = module.params['ssh_opts']
# We screenscrape a huge amount of git commands so use C locale anytime we
# call run_command()
module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_MESSAGES='C', LC_CTYPE='C')
gitconfig = None gitconfig = None
if not dest and allow_clone: if not dest and allow_clone:
module.fail_json(msg="the destination directory must be specified unless clone=no") module.fail_json(msg="the destination directory must be specified unless clone=no")
@ -826,4 +830,5 @@ def main():
from ansible.module_utils.basic import * from ansible.module_utils.basic import *
from ansible.module_utils.known_hosts import * from ansible.module_utils.known_hosts import *
main() if __name__ == '__main__':
main()