aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter/interpreter.py
diff options
context:
space:
mode:
authorVolker Weißmann <volker.weissmann@gmx.de>2021-10-14 01:35:14 +0200
committerEli Schwartz <eschwartz93@gmail.com>2021-10-30 22:26:28 -0400
commit2c079d855ed87488bdcc6c5c06f59abdb9b85b6c (patch)
tree62206d581a9ff764d948da94d4478dba85bce765 /mesonbuild/interpreter/interpreter.py
parent3c103fe49ccca848d255b9b00365e74ce35400a4 (diff)
downloadmeson-2c079d855ed87488bdcc6c5c06f59abdb9b85b6c.zip
meson-2c079d855ed87488bdcc6c5c06f59abdb9b85b6c.tar.gz
meson-2c079d855ed87488bdcc6c5c06f59abdb9b85b6c.tar.bz2
Added warning if run_command is called without the check kwarg
Diffstat (limited to 'mesonbuild/interpreter/interpreter.py')
-rw-r--r--mesonbuild/interpreter/interpreter.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index f1dcaff..1aa7829 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -232,6 +232,10 @@ permitted_dependency_kwargs = {
'version',
}
+implicit_check_false_warning = """You should add the boolean check kwarg to the run_command call.
+ It currently defaults to false,
+ but it will default to true in future releases of meson.
+ See also: https://github.com/mesonbuild/meson/issues/9300"""
class Interpreter(InterpreterBase, HoldableObject):
def __init__(
@@ -692,7 +696,11 @@ external dependencies (including libraries) must go to "dependencies".''')
srcdir = self.environment.get_source_dir()
builddir = self.environment.get_build_dir()
- check = kwargs.get('check', False)
+ check = kwargs.get('check')
+ if check is None:
+ mlog.warning(implicit_check_false_warning, once=True)
+ check = False
+
if not isinstance(check, bool):
raise InterpreterException('Check must be boolean.')