Merge pull request #3121 from ryanpetrello/busted-isolated

properly detect ansible-playbook vs ansible runs in bwrap arg building

Reviewed-by: Elijah DeLee <kdelee@redhat.com>
             https://github.com/kdelee
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-01-31 16:27:06 +00:00 committed by GitHub
commit 2b80f0f7b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -882,7 +882,7 @@ def wrap_args_with_proot(args, cwd, **kwargs):
path = os.path.realpath(path)
new_args.extend(['--bind', '%s' % (path,), '%s' % (path,)])
if kwargs.get('isolated'):
if 'ansible-playbook' in args:
if '/bin/ansible-playbook' in ' '.join(args):
# playbook runs should cwd to the SCM checkout dir
new_args.extend(['--chdir', os.path.join(kwargs['private_data_dir'], 'project')])
else: