diff --git a/services/clsi/app/coffee/CommandRunner.coffee b/services/clsi/app/coffee/CommandRunner.coffee index 298a495051..11bbff82d3 100644 --- a/services/clsi/app/coffee/CommandRunner.coffee +++ b/services/clsi/app/coffee/CommandRunner.coffee @@ -27,6 +27,10 @@ module.exports = CommandRunner = err = new Error("terminated") err.terminated = true return callback(err) + else if code + err = new Error("exit") + err.code = code + return callback(err) else callback() diff --git a/services/clsi/app/coffee/CompileController.coffee b/services/clsi/app/coffee/CompileController.coffee index 38d53f934b..3c9af677ae 100644 --- a/services/clsi/app/coffee/CompileController.coffee +++ b/services/clsi/app/coffee/CompileController.coffee @@ -17,6 +17,8 @@ module.exports = CompileController = CompileManager.doCompile request, (error, outputFiles = []) -> if error?.terminated status = "terminated" + else if error?.code is 1 + status = "exited" else if error? logger.error err: error, project_id: request.project_id, "error running compile" if error.timedout diff --git a/services/clsi/app/coffee/CompileManager.coffee b/services/clsi/app/coffee/CompileManager.coffee index 81c2c03975..3b19cecaba 100644 --- a/services/clsi/app/coffee/CompileManager.coffee +++ b/services/clsi/app/coffee/CompileManager.coffee @@ -44,9 +44,9 @@ module.exports = CompileManager = # set up environment variables for chktex env = {} - if request.chktex? - env['CHKTEX_OPTIONS'] = '-nall -e9 -e10 -e15 -e16 -e27' - if request.chktex is 'error' + if request.check? + env['CHKTEX_OPTIONS'] = '-nall -e9 -e10 -w15 -w16 -w27' + if request.check is 'error' env['CHKTEX_EXIT_ON_ERROR'] = 1 injectDraftModeIfRequired (error) -> @@ -67,7 +67,7 @@ module.exports = CompileManager = environment: env }, (error, output, stats, timings) -> # compile was killed by user - if error?.terminated + if error?.terminated or error?.code is 1 OutputFileFinder.findOutputFiles request.resources, compileDir, (err, outputFiles) -> return callback(err) if err? callback(error, outputFiles) # return output files so user can check logs diff --git a/services/clsi/app/coffee/RequestParser.coffee b/services/clsi/app/coffee/RequestParser.coffee index bd081fd011..5979c75c20 100644 --- a/services/clsi/app/coffee/RequestParser.coffee +++ b/services/clsi/app/coffee/RequestParser.coffee @@ -28,6 +28,9 @@ module.exports = RequestParser = compile.options.draft, default: false, type: "boolean" + response.check = @_parseAttribute "check", + compile.options.check, + type: "string" if response.timeout > RequestParser.MAX_TIMEOUT response.timeout = RequestParser.MAX_TIMEOUT