mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07: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…
Add table
Add a link
Reference in a new issue