From 43abd62ecc1377b6fec67f77cc8843e844b46bc8 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Sun, 5 Mar 2023 11:17:09 -0500 Subject: hotdoc module: properly error out when configuring fails We used to just abort during configure because we ran in-process and hotdoc's argparse would leak into our own process space. Now we fail to handle this case and succeed at configuring, only for building to fail because the hotdoc config file doesn't exist. --- mesonbuild/modules/hotdoc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesonbuild/modules/hotdoc.py b/mesonbuild/modules/hotdoc.py index b73d812..c0a572a 100644 --- a/mesonbuild/modules/hotdoc.py +++ b/mesonbuild/modules/hotdoc.py @@ -247,7 +247,8 @@ class HotdocTargetBuilder: ncwd = os.path.join(self.sourcedir, self.subdir) mlog.log('Generating Hotdoc configuration for: ', mlog.bold(self.name)) os.chdir(ncwd) - self.hotdoc.run_hotdoc(self.flatten_config_command()) + if self.hotdoc.run_hotdoc(self.flatten_config_command()) != 0: + raise MesonException('hotdoc failed to configure') os.chdir(cwd) def ensure_file(self, value): -- cgit v1.1