feat: add --temp-dir flag for configurable temp directory location#883
Open
de-abreu wants to merge 1 commit into
Open
feat: add --temp-dir flag for configurable temp directory location#883de-abreu wants to merge 1 commit into
de-abreu wants to merge 1 commit into
Conversation
Add a new --temp-dir CLI flag that allows users to specify where presenterm should create temporary directories when rendering typst and LaTeX content. This is useful when presentations are stored in read-only directories such as the nix store, where the default behavior of creating temp directories in the presentation's directory would fail. When --temp-dir is provided, temporary directories are created in the specified location. Otherwise, the system temp directory is used. Fixes rendering issues when running presenterm on presentations stored in read-only filesystems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a new
--temp-dirCLI flag that allows users to specify where presenterm should create temporary directories when rendering typst and LaTeX content.Problem
Presenterm creates temporary directories in the presentation file's directory when rendering typst/latex content. This fails when presentations are stored in read-only directories such as the nix store.
Solution
--temp-dirCLI flag to specify a custom temporary directoryChanges
temp_dirfield toThirdPartyConfigs--temp-dirCLI argumentdo_render_typstto use configured temp dir or system tempUse Case
This is particularly useful for nix users who want to run presentations directly from the nix store:
Fixes rendering issues when running presenterm on presentations stored in read-only filesystems.