devenv: Resolve executable in devenv's PATH

Fixes: #10815
This commit is contained in:
Xavier Claessens
2022-09-15 08:46:15 -04:00
committed by Xavier Claessens
parent d924586bee
commit 7e4188a53f

View File

@@ -165,6 +165,10 @@ def run(options: argparse.Namespace) -> int:
tmprc.flush()
args.append("--rcfile")
args.append(tmprc.name)
else:
# Try to resolve executable using devenv's PATH
abs_path = shutil.which(args[0], path=devenv.get('PATH', None))
args[0] = abs_path or args[0]
try:
return subprocess.call(args, close_fds=False,