mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Update executables.py
This commit is contained in:
parent
32a085543a
commit
a24497ac12
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ def locate_file(name, env=None, check_executable=False, use_pathext=False):
|
||||||
"""
|
"""
|
||||||
env = env if env is not None else XSH.env
|
env = env if env is not None else XSH.env
|
||||||
env_path = env.get("PATH", [])
|
env_path = env.get("PATH", [])
|
||||||
paths = tuple(tuple(clear_paths(env_path)))
|
paths = tuple(clear_paths(env_path))
|
||||||
possible_names = get_possible_names(name, env) if use_pathext else [name]
|
possible_names = get_possible_names(name, env) if use_pathext else [name]
|
||||||
|
|
||||||
for path, possible_name in itertools.product(paths, possible_names):
|
for path, possible_name in itertools.product(paths, possible_names):
|
||||||
|
|
Loading…
Add table
Reference in a new issue