mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
parent
3a36c024da
commit
d4c63e3300
1 changed files with 9 additions and 4 deletions
|
@ -58,10 +58,15 @@ class PluginLoader(object):
|
||||||
"""Return a list of paths to search for plugins in
|
"""Return a list of paths to search for plugins in
|
||||||
|
|
||||||
The list is searched in order."""
|
The list is searched in order."""
|
||||||
return self._extra_dirs + \
|
ret = []
|
||||||
[os.path.join(basedir, self.subdir) for basedir in _basedirs] + \
|
ret += self._extra_dirs
|
||||||
self.config.split(os.pathsep) + \
|
for basedir in _basedirs:
|
||||||
self._get_package_path()
|
fullpath = os.path.join(basedir, self.subdir)
|
||||||
|
if fullpath not in ret:
|
||||||
|
ret.append(fullpath)
|
||||||
|
ret += self.config.split(os.pathsep)
|
||||||
|
ret += self._get_package_path()
|
||||||
|
return ret
|
||||||
|
|
||||||
def add_directory(self, directory):
|
def add_directory(self, directory):
|
||||||
"""Adds an additional directory to the search path"""
|
"""Adds an additional directory to the search path"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue