mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-28 11:59:09 -07:00
avoid bad path entries
This commit is contained in:
parent
1802e09b08
commit
fdb56e4bad
1 changed files with 2 additions and 0 deletions
|
@ -1546,6 +1546,8 @@ class AnsibleModule(object):
|
||||||
if p not in paths and os.path.exists(p):
|
if p not in paths and os.path.exists(p):
|
||||||
paths.append(p)
|
paths.append(p)
|
||||||
for d in paths:
|
for d in paths:
|
||||||
|
if not d:
|
||||||
|
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 is_executable(path):
|
||||||
bin_path = path
|
bin_path = path
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue