Check if file is not a directory with get_bin_path function (#13985)

pull/22507/head
THEBAULT Julien 8 years ago committed by Brian Coca
parent 89e4226051
commit 374d491ba5

@ -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…
Cancel
Save