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

Only use cwd in run_command kwargs if the directory exists

This commit is contained in:
James Cammarata 2014-03-12 15:59:24 -05:00
parent 81b4ebbe1d
commit 303e085f8b

View file

@ -1069,7 +1069,7 @@ class AnsibleModule(object):
if path_prefix: if path_prefix:
kwargs['env'] = env kwargs['env'] = env
if cwd: if cwd and os.path.isdir(cwd):
kwargs['cwd'] = cwd kwargs['cwd'] = cwd