Cache exe lookups

This commit is contained in:
Kovid Goyal 2021-02-04 11:36:59 +05:30
parent 7eba3b6cbc
commit af94e07618
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -538,6 +538,7 @@ def system_paths_on_macos() -> List[str]:
return entries return entries
@lru_cache
def find_exe(name: str) -> Optional[str]: def find_exe(name: str) -> Optional[str]:
import shutil import shutil
ans = shutil.which(name) ans = shutil.which(name)