mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
handle failed compile due to validation error
This commit is contained in:
parent
481e842f33
commit
e23512f0e0
1 changed files with 6 additions and 1 deletions
|
@ -68,11 +68,16 @@ module.exports = CompileManager =
|
|||
image: request.imageName
|
||||
environment: env
|
||||
}, (error, output, stats, timings) ->
|
||||
# request was for validation only
|
||||
if request.check is "validate"
|
||||
result = if error?.code then "fail" else "pass"
|
||||
error = new Error("validation")
|
||||
error.validate = result
|
||||
# compile was killed by user
|
||||
# request was for compile, and failed on validation
|
||||
if request.check is "error" and error?.message is 'exited'
|
||||
error = new Error("compilation")
|
||||
error.validate = "fail"
|
||||
# compile was killed by user, was a validation, or a compile which failed validation
|
||||
if error?.terminated or error?.validate
|
||||
OutputFileFinder.findOutputFiles request.resources, compileDir, (err, outputFiles) ->
|
||||
return callback(err) if err?
|
||||
|
|
Loading…
Reference in a new issue