Just as the title says either RStudio creates a "nul" file during rending RMarkdown or quarto. These nul files are not able to be deleted. Does anyone have a solution to remove this file in Windows?
cderv
December 28, 2023, 1:09pm
2
I believe this happens while rendering to PDF right ?
It is possible that this issue is happening again:
opened 06:59PM - 09 Feb 22 UTC
closed 03:14PM - 18 Feb 22 UTC
Hi,
every now and then a `nul` file appears inside my project directory after… knitting to PDF. That would be no big deal, but this special file cannot be removed by standard means and it really messes up `git`.
I've found out that this is due to `tlmgr` and could finally reproduce the issue with `tinytex::tlmgr_update()`. Some fancy "debugging" and system process monitoring revealed that `{tinytex}`'s `tlmgr` calls `curl`, shipped with Rtools42 on Windows. `curl` tries to download something but ends up creating the `nul` file. Note that this won't happen when you specify some non-default CTAN (I mean not using `--repository ctan`) as pointed out at https://tug.org/pipermail/tex-live/2019-July/043908.html. Lastly, if I run `tlmgr update --list --self` in CMD in the same directory, no `nul` appears as it doesn't use `curl` (~~according to Process Monitor~~ EDIT: seems like it does).
~~Apparently, you can specify what to use in TeX environment table, as described here: https://tug.org/texlive/doc/tlmgr.html#ENVIRONMENT-VARIABLES. I wonder if it can be mitigated somehow on `{tinytex}` side.~~
EDIT: The issue seems to originate somewhere around https://github.com/TeX-Live/texlive-source/blob/fc5589360e8051b3c578d09ad6afdc212d375267/texk/tests/TeXLive/TLUtils.pm#L4164. I'll contact TUG mailing list with the issue.
Many thanks!
Session info:
```
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000), RStudio 2021.9.1.372
Locale:
LC_COLLATE=Czech_Czechia.1250 LC_CTYPE=Czech_Czechia.1250 LC_MONETARY=Czech_Czechia.1250 LC_NUMERIC=C
LC_TIME=Czech_Czechia.1250
Package version:
graphics_4.1.2 grDevices_4.1.2 stats_4.1.2 tinytex_0.36 tools_4.1.2 utils_4.1.2 xfun_0.29
LaTeX version used:
TeX Live 2021 (TinyTeX) with tlmgr 2021-10-04
```
---
By filing an issue to this repo, I promise that
- [x] I have fully read the issue guide at https://yihui.org/issue/.
- [x] I have provided the necessary information about my issue.
- If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
- If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included `xfun::session_info('tinytex')`. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: `remotes::install_github('yihui/tinytex')`.
- If I have posted the same issue elsewhere, I have also mentioned it in this issue.
- [x] I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
or that you need to update tinytex R package
If this is happening with Quarto, I believe we should do the same fix in quarto than in tinytex R package (fix #354: set the env var TEXLIVE_PREFER_OWN=1 before calling tlmgr t… · rstudio/tinytex@dd6b43d · GitHub )
I have opened to track
opened 01:12PM - 28 Dec 23 UTC
latex
This is an issue we encountered in **tinytex** R package (https://github.com/rst… udio/tinytex/issues/354) and that was solved in https://github.com/rstudio/tinytex/commit/dd6b43d90a112d9527f5b0b16ca07bdd37d56923 by being sure that `tlmgr` does not use another program than its own (like `curl`).
We should probably do the same fix in Quarto
system
Closed
February 8, 2024, 1:10pm
3
This topic was automatically closed 42 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.