Merge pull request #34350 from overleaf/mj-pandoc-texinputs

[clsi] Add TEXINPUTS variable to compressing conversion

GitOrigin-RevId: 7d708f106f6abf344707a87ba75a6e41f4023bd8
This commit is contained in:
Mathias Jakobsen
2026-06-09 08:06:05 +00:00
committed by Copybot
parent eb031f4c3c
commit f52dccbee5
2 changed files with 12 additions and 1 deletions
+6 -1
View File
@@ -274,7 +274,12 @@ async function convertLaTeXToDocumentInDir(
compileDir,
Settings.pandocImage,
timeoutMs,
{},
{
// By default pandoc uses cwd for resolving \input, \include, etc.
// Setting TEXINPUTS allows us to override that to look in the actual
// compileDir rather than the output directory.
TEXINPUTS: '..:',
},
'conversions',
outputId
)
@@ -433,6 +433,12 @@ describe('ConversionManager', function () {
)
})
it('should run the conversion and set the TEXINPUTS environment variable', function (ctx) {
expect(
ctx.CommandRunner.promises.run.firstCall.args[5]
).toMatchObject({ TEXINPUTS: '..:' })
})
it('should run pandoc then zip the subdirectory and return the zip path', function (ctx) {
expect(ctx.CommandRunner.promises.run.callCount).toBe(2)
expect(ctx.CommandRunner.promises.run.secondCall.args[1]).toEqual([