mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 11:21:25 -07:00
Merge pull request #3316 from dsedivec/devel
expanduser on each component of plug-in paths
This commit is contained in:
commit
98e7eaf07a
3 changed files with 56 additions and 7 deletions
|
@ -16,6 +16,7 @@
|
|||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import sys
|
||||
import glob
|
||||
import imp
|
||||
|
@ -108,6 +109,7 @@ class PluginLoader(object):
|
|||
# look in any configured plugin paths, allow one level deep for subcategories
|
||||
configured_paths = self.config.split(os.pathsep)
|
||||
for path in configured_paths:
|
||||
path = os.path.expanduser(path)
|
||||
contents = glob.glob("%s/*" % path)
|
||||
for c in contents:
|
||||
if os.path.isdir(c):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue