mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
avoid bad path entries
This commit is contained in:
@@ -1546,6 +1546,8 @@ class AnsibleModule(object):
|
||||
if p not in paths and os.path.exists(p):
|
||||
paths.append(p)
|
||||
for d in paths:
|
||||
if not d:
|
||||
continue
|
||||
path = os.path.join(d, arg)
|
||||
if os.path.exists(path) and is_executable(path):
|
||||
bin_path = path
|
||||
|
||||
Reference in New Issue
Block a user