diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-05-22 19:39:43 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2022-05-24 20:16:16 +0300 |
commit | 950fd06bc312bd72411e721eecab8c740f246203 (patch) | |
tree | f1182cb78f13848fa24e62c8a25d748ba6edabeb /mesonbuild/interpreter | |
parent | a7e458effadbc884eacf34528df3a57b60e43fe3 (diff) | |
download | meson-950fd06bc312bd72411e721eecab8c740f246203.zip meson-950fd06bc312bd72411e721eecab8c740f246203.tar.gz meson-950fd06bc312bd72411e721eecab8c740f246203.tar.bz2 |
fix traceback when run_command has a find_program as the inline arg
We were poking directly at the node, so if it was a FunctionNode then
this broke. Instead, just do a reverse lookup in the overrides table to
get the original find_program name.
Diffstat (limited to 'mesonbuild/interpreter')
-rw-r--r-- | mesonbuild/interpreter/interpreter.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index 09c6d75..acbbf87 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -759,7 +759,12 @@ external dependencies (including libraries) must go to "dependencies".''') 'configuration') expanded_args: T.List[str] = [] if isinstance(cmd, build.Executable): - progname = node.args.arguments[0].value + for name, exe in self.build.find_overrides.items(): + if cmd == exe: + progname = name + break + else: + raise MesonBugException('cmd was a built executable but not found in overrides table') raise InterpreterException(overridden_msg.format(progname, cmd.description())) if isinstance(cmd, ExternalProgram): if not cmd.found(): |