diff options
| author | Christoph Reiter <reiter.christoph@gmail.com> | 2023-09-30 15:03:36 +0200 |
|---|---|---|
| committer | Xavier Claessens <xclaesse@gmail.com> | 2023-09-30 14:57:33 -0400 |
| commit | d7b25662ce5c7f9831b003581054e174b97c4865 (patch) | |
| tree | 66f79539f34b87ca546554b15190c69bd881219a /mesonbuild/modules/__init__.py | |
| parent | 184927eaf57042d617c18ca76c05b147952f745a (diff) | |
| download | meson-d7b25662ce5c7f9831b003581054e174b97c4865.tar.gz | |
find_tool: don't assume the pkgconfig variable is a valid command
ExternalProgram currently assumes that if a command is passed it exists
and can be used as is. In case we extract the path from pkgconfig the
path might not exist, on Windows it might be missing the ".exe" suffix.
By passing the variables as a name ExternalProgram will validate that
the command exists at configure time and will fail if not, and it will
try to fixup the command by appending .exe etc.
Fixes #12271
Diffstat (limited to 'mesonbuild/modules/__init__.py')
| -rw-r--r-- | mesonbuild/modules/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py index eef67a1c7..a1aa23344 100644 --- a/mesonbuild/modules/__init__.py +++ b/mesonbuild/modules/__init__.py @@ -112,7 +112,7 @@ class ModuleState: if dep.found() and dep.type_name == 'pkgconfig': value = dep.get_variable(pkgconfig=varname) if value: - return ExternalProgram(name, [value]) + return ExternalProgram(value) # Normal program lookup return self.find_program(name, required=required, wanted=wanted) |
