mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Check if file is not a directory with get_bin_path function (#13985)
This commit is contained in:
parent
89e4226051
commit
374d491ba5
1 changed files with 1 additions and 1 deletions
|
@ -1892,7 +1892,7 @@ class AnsibleModule(object):
|
||||||
if not d:
|
if not d:
|
||||||
continue
|
continue
|
||||||
path = os.path.join(d, arg)
|
path = os.path.join(d, arg)
|
||||||
if os.path.exists(path) and is_executable(path):
|
if os.path.exists(path) and not os.path.isdir(path) and is_executable(path):
|
||||||
bin_path = path
|
bin_path = path
|
||||||
break
|
break
|
||||||
if required and bin_path is None:
|
if required and bin_path is None:
|
||||||
|
|
Loading…
Reference in a new issue