Skip to content

Commit

Permalink
Update utilitylib.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer-coding authored Jun 16, 2024
1 parent eefe8cb commit 533e764
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mesonui/mesonuilib/utilitylib.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# copyright 2020 The Meson-UI development team
#
"""A library of random helper functionality."""
from distutils.spawn import find_executable
from pathlib import Path
import subprocess
import functools
Expand All @@ -22,12 +21,12 @@
import typing as T


def find_executables(file_names):
def find_executables(file_names: T.List[str]) -> str:
for file_name in file_names:
res = find_executable(file_name)
if res:
res = shutil.which(file_name)
if res is not None:
return res
raise RuntimeError(f'Executables "{file_names}" not found in path.')
raise RuntimeError(f'Executable(s) "{", ".join(file_names)}" not found in path.')


'''
Expand Down

0 comments on commit 533e764

Please sign in to comment.