diff --git a/services/clsi/app/js/CompileManager.js b/services/clsi/app/js/CompileManager.js index 6d578318ae..2a685d3e86 100644 --- a/services/clsi/app/js/CompileManager.js +++ b/services/clsi/app/js/CompileManager.js @@ -107,7 +107,9 @@ async function doCompile(request) { timings.sync = writeToDiskTimer.done() // set up environment variables for chktex - const env = {} + const env = { + OVERLEAF_PROJECT_ID: request.project_id, + } if (Settings.texliveOpenoutAny && Settings.texliveOpenoutAny !== '') { // override default texlive openout_any environment variable env.openout_any = Settings.texliveOpenoutAny diff --git a/services/clsi/test/unit/js/CompileManagerTests.js b/services/clsi/test/unit/js/CompileManagerTests.js index ddfa06af02..6aa416afae 100644 --- a/services/clsi/test/unit/js/CompileManagerTests.js +++ b/services/clsi/test/unit/js/CompileManagerTests.js @@ -175,7 +175,9 @@ describe('CompileManager', function () { compileGroup: (this.compileGroup = 'compile-group'), stopOnFirstError: false, } - this.env = {} + this.env = { + OVERLEAF_PROJECT_ID: this.projectId, + } }) describe('when the project is locked', function () { @@ -285,6 +287,7 @@ describe('CompileManager', function () { CHKTEX_OPTIONS: '-nall -e9 -e10 -w15 -w16', CHKTEX_EXIT_ON_ERROR: 1, CHKTEX_ULIMIT_OPTIONS: '-t 5 -v 64000', + OVERLEAF_PROJECT_ID: this.projectId, }, compileGroup: this.compileGroup, stopOnFirstError: this.request.stopOnFirstError,