Raise if a postconf script fails

Raise MesonException if a postconf script fails to let the user know
about the failure.
pull/12806/merge
Akihiko Odaki 1 year ago committed by Nirbheek Chauhan
parent ed1a1d567a
commit adf09b8316
  1. 4
      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')

Loading…
Cancel
Save