Delegate ansible-test with LC_ALL=en_US.UTF-8.
This fixes encoding issues in ansible-test when running tests in delegated environments that do not have LC_ALL or LANG set by default.
This commit is contained in:
parent
518699988f
commit
dca4eb3dcd
1 changed files with 7 additions and 0 deletions
|
@ -432,6 +432,13 @@ def generate_command(args, path, options, exclude, require):
|
|||
options['--color'] = 1
|
||||
|
||||
cmd = [path]
|
||||
|
||||
# Force the encoding used during delegation.
|
||||
# This is only needed because ansible-test relies on Python's file system encoding.
|
||||
# Environments that do not have the locale configured are thus unable to work with unicode file paths.
|
||||
# Examples include FreeBSD and some Linux containers.
|
||||
cmd = ['/usr/bin/env', 'LC_ALL=en_US.UTF-8'] + cmd
|
||||
|
||||
cmd += list(filter_options(args, sys.argv[1:], options, exclude, require))
|
||||
cmd += ['--color', 'yes' if args.color else 'no']
|
||||
|
||||
|
|
Loading…
Reference in a new issue