Split PATH on os.pathsep, that is what it's there for

parent a025cfcb
...@@ -577,7 +577,7 @@ class AnsibleModule(object): ...@@ -577,7 +577,7 @@ class AnsibleModule(object):
for d in opt_dirs: for d in opt_dirs:
if d is not None and os.path.exists(d): if d is not None and os.path.exists(d):
paths.append(d) paths.append(d)
paths += os.environ.get('PATH', '').split(':') paths += os.environ.get('PATH', '').split(os.pathsep)
bin_path = None bin_path = None
# mangle PATH to include /sbin dirs # mangle PATH to include /sbin dirs
for p in sbin_paths: for p in sbin_paths:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment