diff options
| author | KO Myung-Hun <komh@chollian.net> | 2023-07-03 23:06:27 +0900 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-11-14 08:16:23 -0800 |
| commit | 7d118937c4b36650305a0e7da7f5cf642dd30e80 (patch) | |
| tree | e333db264fcaf565cdfd0bdf6b4c5510369a8ebf /mesonbuild/programs.py | |
| parent | 4b58e349657ef386e4311dcc7552fc1c0ac2293f (diff) | |
| download | meson-7d118937c4b36650305a0e7da7f5cf642dd30e80.tar.gz | |
Extension of the executable is `exe' on OS/2
Diffstat (limited to 'mesonbuild/programs.py')
| -rw-r--r-- | mesonbuild/programs.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/programs.py b/mesonbuild/programs.py index 0abf09720..a1cfc06e9 100644 --- a/mesonbuild/programs.py +++ b/mesonbuild/programs.py @@ -322,6 +322,11 @@ class ExternalProgram(mesonlib.HoldableObject): paths = OrderedSet(path.split(os.pathsep)).difference(exclude_paths) path = os.pathsep.join(paths) command = shutil.which(name, path=path) + if not command and mesonlib.is_os2(): + for ext in ['exe', 'cmd']: + command = shutil.which(f'{name}.{ext}', path=path) + if command: + return [command] if mesonlib.is_windows(): return self._search_windows_special_cases(name, command, exclude_paths) # On UNIX-like platforms, shutil.which() is enough to find |
