From b402817fb6f0392812bfa272bdbc05c9c30139fa Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 19 Jan 2022 14:28:46 -0800 Subject: interpreter: use find_program_impl instead of shutil.which for vcs_tag This is the right thing to do, using which is wrong. --- mesonbuild/interpreter/interpreter.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index d636085..bed9278 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -1686,8 +1686,7 @@ external dependencies (including libraries) must go to "dependencies".''') vcs_cmd = kwargs['command'] source_dir = os.path.normpath(os.path.join(self.environment.get_source_dir(), self.subdir)) if vcs_cmd: - # Is the command an executable in path or maybe a script in the source tree? - vcs_cmd[0] = shutil.which(vcs_cmd[0]) or os.path.join(source_dir, vcs_cmd[0]) + vcs_cmd[0] = self.find_program_impl(vcs_cmd[0]) else: vcs = mesonlib.detect_vcs(source_dir) if vcs: -- cgit v1.1