diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2025-02-03 09:51:36 -0800 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-10-02 08:48:06 -0700 |
| commit | beef43283c03f64111117a9b973c517dbf093847 (patch) | |
| tree | b23a58b299f8183b7bddedcfca8d1742c3f3798f /mesonbuild | |
| parent | 12bebed5a13f9597476fc05d82d5c9586875ee1d (diff) | |
| download | meson-beef43283c03f64111117a9b973c517dbf093847.tar.gz | |
interpreter: catch '@DEPFILE@' in run_target and raise an exception
If this gets to the backend it will cause an uncaught exception, so
let's catch it here and just give a real error.
Diffstat (limited to 'mesonbuild')
| -rw-r--r-- | mesonbuild/interpreter/interpreter.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index 2cf5b7a5b..a682bc822 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -2172,6 +2172,10 @@ class Interpreter(InterpreterBase, HoldableObject): raise InterpreterException(f'Tried to use non-existing executable {i.name!r}') if isinstance(all_args[0], str): all_args[0] = self.find_program_impl([all_args[0]]) + + if '@DEPFILE@' in all_args: + raise InterpreterException('run_target does not have support for @DEPFILE@') + name = args[0] tg = build.RunTarget(name, all_args, kwargs['depends'], self.subdir, self.subproject, self.environment, kwargs['env']) |
