[latex3-commits] [latex3/l3build] main: Return passing errorlevel if BibTeX issues warnings (fixes #260) (22348ef)
github at latex-project.org
github at latex-project.org
Mon Sep 11 11:19:25 CEST 2023
Repository : https://github.com/latex3/l3build
On branch : main
Link : https://github.com/latex3/l3build/commit/22348efd905fa8e3b5c30448fd0e2787056b2d5f
>---------------------------------------------------------------
commit 22348efd905fa8e3b5c30448fd0e2787056b2d5f
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Mon Sep 11 10:19:25 2023 +0100
Return passing errorlevel if BibTeX issues warnings (fixes #260)
>---------------------------------------------------------------
22348efd905fa8e3b5c30448fd0e2787056b2d5f
CHANGELOG.md | 4 ++++
l3build-typesetting.lua | 6 ++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 45a1038..5ba802a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,10 @@ this project uses date-based 'snapshot' version identifiers.
- Extend version string normalisation during checks
(see issue \#96)
+### Fixed
+- Return passing errorlevel if BibTeX issues warnings
+ (see \#260)
+
## [2023-09-07]
### Changed
diff --git a/l3build-typesetting.lua b/l3build-typesetting.lua
index d0e491d..c12c544 100644
--- a/l3build-typesetting.lua
+++ b/l3build-typesetting.lua
@@ -72,8 +72,10 @@ function bibtex(name,dir)
os_grepexe .. " \"^" .. grep .. "bibdata{\" " .. name .. ".aux > "
.. os_null
) == 0 then
- return runcmd(bibtexexe .. " " .. bibtexopts .. " " .. name,dir,
- {"BIBINPUTS","BSTINPUTS"})
+ local errorlevel = runcmd(bibtexexe .. " " .. bibtexopts .. " " .. name,
+ dir,{"BIBINPUTS","BSTINPUTS"})
+ -- BibTeX(8) signals warnings with errorlevel 1
+ if errorlevel > 1 then return errorlevel else return 0 end
end
end
return 0
More information about the latex3-commits
mailing list.