Skip to content

Commit

Permalink
Raise if a postconf script fails
Browse files Browse the repository at this point in the history
Raise MesonException if a postconf script fails to let the user know
about the failure.
  • Loading branch information
akihikodaki authored and nirbheek committed Feb 11, 2024
1 parent ed1a1d5 commit adf09b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mesonbuild/backend/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -1620,7 +1620,9 @@ def run_postconf_scripts(self) -> None:
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')
Expand Down

0 comments on commit adf09b8

Please sign in to comment.