diff --git a/CHANGELOG.md b/CHANGELOG.md index b2a6e37..67f0d89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 2024-06-28-2 + +* Run all commands in same directory to simplify path resolution for `filecontents` and uploaded resources + ## 2024-06-28-1 * Set `cwd` for latexrun.py so the `filecontents` directives can work as expected #42 diff --git a/docker-compose.test.yml b/docker-compose.test.yml index a464a21..4de54bf 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -10,6 +10,7 @@ services: - .:/app/latex-on-http environment: CACHE_HOST: cache + KEEP_WORKSPACE_DIR_ON_ERROR: 1 cache: build: context: . diff --git a/latexonhttp/compiler.py b/latexonhttp/compiler.py index b4b5c53..5ecb653 100644 --- a/latexonhttp/compiler.py +++ b/latexonhttp/compiler.py @@ -94,7 +94,9 @@ def latexToPdf(compilerName, directory, main_resource, options={}): # TODO Uses workspace.filesystem module to these get paths. input_path = "{}/{}".format(directory, main_resource["build_path"]) output_path = "{}/output.pdf".format(directory) - log_dir = "{}/latex.out".format(directory) + # Use the same root directory to prevent issues + # with filecontents and uploaded resources (path resolution). + log_dir = "{}".format(directory) logger.info("Compiling %s from %s", main_resource["build_path"], directory) # Use https://github.com/aclements/latexrun # to manage multiple runs of Latex compiler for us. diff --git a/tests/test_up_and_running.py b/tests/test_up_and_running.py index 1c5893b..cfca989 100644 --- a/tests/test_up_and_running.py +++ b/tests/test_up_and_running.py @@ -22,7 +22,7 @@ def test_api_index(latex_on_http_api_url): "message": "Welcome to the LaTeX-On-HTTP API", "source": "https://github.com/YtoTech/latex-on-http", "documentation": "https://github.com/YtoTech/latex-on-http", - "texlive_version": "2023", + "texlive_version": "2024", "version": get_api_version(), }