Add flags option to request JSON

Adds a `flags` parameter to the request JSON, appearing under the `compile.options` key (alongside such stalwarts as `compiler`, `timeout`, etc.).

This is primarily to support `-file-line-error` as an option, but could have other uses as well.

`flags` should be an array of strings, or absent. If supplied, the listed arguments are added to the base latexmk command.
This commit is contained in:
Michael Mazour
2019-05-10 16:51:40 +01:00
parent 03047f45af
commit 663ec88718
6 changed files with 82 additions and 38 deletions

View File

@@ -93,6 +93,7 @@ module.exports = CompileManager =
compiler: request.compiler
timeout: request.timeout
image: request.imageName
flags: request.flags
environment: env
}, (error, output, stats, timings) ->
# request was for validation only
@@ -130,7 +131,7 @@ module.exports = CompileManager =
return callback(error) if error?
OutputCacheManager.saveOutputFiles outputFiles, compileDir, (error, newOutputFiles) ->
callback null, newOutputFiles
stopCompile: (project_id, user_id, callback = (error) ->) ->
compileName = getCompileName(project_id, user_id)
LatexRunner.killLatex compileName, callback