Allow adding extra flags to LaTeX compiler through environment variable

This commit is contained in:
yu-i-i
2026-07-17 17:54:27 +02:00
parent 5b8db1ddef
commit 2b78561654
@@ -1063,7 +1063,7 @@ async function _getContentFromMongo(projectId) {
function _finaliseRequest(projectId, options, project, docs, files) {
const resources = []
let flags
let flags = []
let rootResourcePath = options.rootResourcePath
let rootResourcePathOverride = null
let hasMainFile = false
@@ -1132,6 +1132,10 @@ function _finaliseRequest(projectId, options, project, docs, files) {
flags = ['-file-line-error']
}
if (process.env.TEX_COMPILER_EXTRA_FLAGS) {
flags.push(...process.env.TEX_COMPILER_EXTRA_FLAGS.split(/\s+/).filter(Boolean))
}
return {
compile: {
options: {