mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
handle old versions of latexmk in run count extraction (#30597)
* handle old versions of latexmk in run count extraction the log lines for the run number change from stderr to stdout in TL2022 * extend SimpleLatexFileTest to include TL2017 * reset metrics for each scenario in SimpleLatexFileTests * fix buildscript merge conflict GitOrigin-RevId: fb74f2025d21ddf43be6a3b90ac6f7df4d975db6
This commit is contained in:
@@ -87,7 +87,9 @@ function runLatex(projectId, options, callback) {
|
||||
}
|
||||
// number of latex runs and whether there were errors
|
||||
const runs =
|
||||
output?.stdout?.match(/^Run number \d+ of .*latex/gm)?.length || 0
|
||||
output?.stdout?.match(/^Run number \d+ of .*latex/gm)?.length || // TeXLive 2022 and later
|
||||
output?.stderr?.match(/^Run number \d+ of .*latex/gm)?.length || // TeXLive 2021 and earlier
|
||||
0
|
||||
const failed = output?.stdout?.match(/^Latexmk: Errors/m) != null ? 1 : 0
|
||||
// counters from latexmk output
|
||||
stats['latexmk-errors'] = failed
|
||||
|
||||
Reference in New Issue
Block a user