aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-07-01 19:45:03 +0300
committerGitHub <noreply@github.com>2018-07-01 19:45:03 +0300
commitdc683218a4dbb099d0da1c46e4e7bfe4f19ad9ce (patch)
tree3e258e12386c37abed42e4c37abf4d926d8e7b9e /mesonbuild/interpreter.py
parent7b2a07bcf9d3fd00013b51896ff3fe6ea852f114 (diff)
downloadmeson-dc683218a4dbb099d0da1c46e4e7bfe4f19ad9ce.zip
meson-dc683218a4dbb099d0da1c46e4e7bfe4f19ad9ce.tar.gz
meson-dc683218a4dbb099d0da1c46e4e7bfe4f19ad9ce.tar.bz2
Proper error message for non-found exe in run_target. Closes #3818
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 5a9cc22..2cf1752 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -3087,6 +3087,8 @@ root and issuing %s.
if not isinstance(i, (str, build.BuildTarget, build.CustomTarget, dependencies.ExternalProgram, mesonlib.File)):
mlog.debug('Wrong type:', str(i))
raise InterpreterException('Invalid argument to run_target.')
+ if isinstance(i, dependencies.ExternalProgram) and not i.found():
+ raise InterpreterException('Tried to use non-existing executable {!r}'.format(i.name))
cleaned_args.append(i)
name = args[0]
if not isinstance(name, str):