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

Make sure the cwd exists in run_command before trying to use it

This commit is contained in:
James Cammarata 2014-03-12 14:33:31 -05:00
parent 751510141f
commit 60a7f57300

View file

@ -1074,8 +1074,10 @@ class AnsibleModule(object):
try:
if cwd:
# make sure we're in the right working directory
if cwd and os.path.isdir(cwd):
os.chdir(cwd)
cmd = subprocess.Popen(args, **kwargs)
if data: