tectonic icon indicating copy to clipboard operation
tectonic copied to clipboard

Make cache directory configurable/disableable

Open iamed2 opened this issue 1 year ago • 3 comments
trafficstars

I'm implementing a containerized service using Pandoc and Tectonic, and have configured the rest of the document generation pipeline to operate within temporary directories. Unfortunately, even if there is no home directory, Tectonic will attempt to create the home directory, and will use 0777 permissions by default. This caused a bit of a headache, as the container was configured to only allow write access to $TMPDIR, and only OS-level system errors were generated (which did not record what paths were inaccessible).

It does not appear like there is a way to prevent this from happening, or route the cache to another folder. The workaround I have used is setting $HOME to $TMPDIR.

Having a configurable option at the CLI to point the cache at a certain directory, or to disable it, or to force it to operate in $TMPDIR, or to force it to operate in outdir, would be preferable IMO and would have prevented the debugging headache.

iamed2 avatar Feb 12 '24 15:02 iamed2

It is possible to change the location of the cache dir with an environment variable, see the bottom of this page.

rm-dr avatar Feb 14 '24 02:02 rm-dr

Does that environment variable work when using the V1 CLI interface?

iamed2 avatar Feb 14 '24 16:02 iamed2

@iamed2 I can't think of any good reason why it wouldn't.

pkgw avatar Feb 15 '24 15:02 pkgw