1
0
Fork 0
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:
THEBAULT Julien 2017-03-10 16:19:00 +01:00 committed by Brian Coca
parent 89e4226051
commit 374d491ba5

View file

@ -1892,7 +1892,7 @@ class AnsibleModule(object):
if not d:
continue
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
break
if required and bin_path is None: