summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2023-09-30 15:03:36 +0200
committerXavier Claessens <xclaesse@gmail.com>2023-09-30 14:57:33 -0400
commitd7b25662ce5c7f9831b003581054e174b97c4865 (patch)
tree66f79539f34b87ca546554b15190c69bd881219a
parent184927eaf57042d617c18ca76c05b147952f745a (diff)
downloadmeson-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
-rw-r--r--mesonbuild/modules/__init__.py2
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)