Only use cwd in run_command kwargs if the directory exists

remotes/origin/release1.5.3
James Cammarata 11 years ago
parent a401f9579d
commit 80df6e4197

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

Loading…
Cancel
Save