quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.98k stars 328 forks source link

mermaid temp files in subfolders not cleaned up #10108

Open hewliyang opened 5 months ago

hewliyang commented 5 months ago

Bug description

https://github.com/quarto-dev/quarto-cli/assets/76434265/4f9fd38c-4e19-4fdb-8eee-9044bc1137e6

When a target .qmd to be rendered to PDF resides in a subfolder the temporary artifacts from the headless browser is not cleaned up.

Steps to reproduce

See https://github.com/hewliyang/quarto-mermaid-reprod

Expected behavior

The temporary artifacts should be cleaned up when no longer needed so as to not pollute the repository

Actual behavior

mermaid_files/figure_latex/...png persists even after succesful render

Your environment

OS:

❯ cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04.6 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.6 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Quarto check output

Quarto 1.5.45
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.5.45
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2024.06
      Chromium: 869685

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /home/azureuser/.TinyTeX/bin/x86_64-linux
      Version: 2024

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.13 (Conda)
      Path: /anaconda/envs/bedok_env/bin/python
      Jupyter: 5.3.1
      Kernels: python3, kedro_kedro_bedok_dc, kedro_spaceflights, python310-sdkv2, python38-azureml, python38-azureml-pt-tf, ir

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.3.2
      Path: /usr/lib/R
      LibPaths:
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      knitr: 1.43
      rmarkdown: 2.22

[✓] Checking Knitr engine render......OK
cscheid commented 5 months ago

Can you share the actual project you have, rather than only a screen capture? Thanks.

hewliyang commented 5 months ago

Can you share the actual project you have, rather than only a screen capture? Thanks.

https://github.com/hewliyang/quarto-mermaid-reprod