Commit fbf36040 by James Cammarata

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

parent 5c568bb0
...@@ -1049,8 +1049,10 @@ class AnsibleModule(object): ...@@ -1049,8 +1049,10 @@ class AnsibleModule(object):
try: try:
if cwd: # make sure we're in the right working directory
if cwd and os.path.isdir(cwd):
os.chdir(cwd) os.chdir(cwd)
cmd = subprocess.Popen(args, **kwargs) cmd = subprocess.Popen(args, **kwargs)
if data: if data:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment