aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2023-08-12 17:57:59 +0900
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2024-02-11 18:28:53 +0530
commitadf09b8316706fe75fd7255125056b077ce05edb (patch)
tree7cbb57ce24d001da3099abec9c9ace064aa23f99 /mesonbuild
parented1a1d567ae178253b0c80228ea223e172a335d9 (diff)
downloadmeson-adf09b8316706fe75fd7255125056b077ce05edb.zip
meson-adf09b8316706fe75fd7255125056b077ce05edb.tar.gz
meson-adf09b8316706fe75fd7255125056b077ce05edb.tar.bz2
Raise if a postconf script fails
Raise MesonException if a postconf script fails to let the user know about the failure.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/backend/backends.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 01ec422..92cc9fb 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -1620,7 +1620,9 @@ class Backend:
for s in self.build.postconf_scripts:
name = ' '.join(s.cmd_args)
mlog.log(f'Running postconf script {name!r}')
- run_exe(s, env)
+ rc = run_exe(s, env)
+ if rc != 0:
+ raise MesonException(f'Postconf script \'{name}\' failed with exit code {rc}.')
def create_install_data(self) -> InstallData:
strip_bin = self.environment.lookup_binary_entry(MachineChoice.HOST, 'strip')