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:
parent
81b4ebbe1d
commit
303e085f8b
1 changed files with 1 additions and 1 deletions
|
@ -1069,7 +1069,7 @@ class AnsibleModule(object):
|
|||
|
||||
if path_prefix:
|
||||
kwargs['env'] = env
|
||||
if cwd:
|
||||
if cwd and os.path.isdir(cwd):
|
||||
kwargs['cwd'] = cwd
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue