Only use cwd in run_command kwargs if the directory exists

pull/5511/merge
James Cammarata 11 years ago
parent 81b4ebbe1d
commit 303e085f8b

@ -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

Loading…
Cancel
Save