mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 21:23:45 +01:00
Merge pull request #34350 from overleaf/mj-pandoc-texinputs
[clsi] Add TEXINPUTS variable to compressing conversion GitOrigin-RevId: 7d708f106f6abf344707a87ba75a6e41f4023bd8
This commit is contained in:
committed by
Copybot
parent
eb031f4c3c
commit
f52dccbee5
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user