aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-03-05 11:17:09 -0500
committerEli Schwartz <eschwartz@archlinux.org>2023-03-05 11:24:13 -0500
commit43abd62ecc1377b6fec67f77cc8843e844b46bc8 (patch)
treef930ed276f5a9d52cd38c4a85afbe7682ba340c4
parent8da060706c2c34fbea91898509123cb190894f3e (diff)
downloadmeson-43abd62ecc1377b6fec67f77cc8843e844b46bc8.zip
meson-43abd62ecc1377b6fec67f77cc8843e844b46bc8.tar.gz
meson-43abd62ecc1377b6fec67f77cc8843e844b46bc8.tar.bz2
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.
-rw-r--r--mesonbuild/modules/hotdoc.py3
1 files changed, 2 insertions, 1 deletions
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):