diff options
| author | Akihiko Odaki <akihiko.odaki@daynix.com> | 2023-08-12 17:57:59 +0900 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2024-02-11 18:28:53 +0530 |
| commit | adf09b8316706fe75fd7255125056b077ce05edb (patch) | |
| tree | 7cbb57ce24d001da3099abec9c9ace064aa23f99 | |
| parent | ed1a1d567ae178253b0c80228ea223e172a335d9 (diff) | |
| download | meson-adf09b8316706fe75fd7255125056b077ce05edb.tar.gz | |
Raise if a postconf script fails
Raise MesonException if a postconf script fails to let the user know
about the failure.
| -rw-r--r-- | mesonbuild/backend/backends.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 01ec422f4..92cc9fb51 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') |
