Skip to content

Commit f9d7b6e

Browse files
authored
Keep empty files when bundling Quarto in our builds (#9820)
I _hope_ that this addresses problems that folks are experiencing like: - #5553 - #9081 - quarto-dev/quarto-r#283 We originally thought what needed to happen was to bundle tinytex or another PDF engine, but that may not be the source of the error folks are experiencing. Instead, as @cderv explains, these empty but required files are missing, leading to errors like: > NotFound: The system cannot find the file specified. (os error 2): lstat 'C:\Users\JonVanausdeln\AppData\Local\Programs\Positron\resources\app\quarto\share\formats\pdf\pandoc\before-bib.tex' ### Release Notes <!-- Optionally, replace `N/A` with text to be included in the next release notes. The `N/A` bullets are ignored. If you refer to one or more Positron issues, these issues are used to collect information about the feature or bugfix, such as the relevant language pack as determined by Github labels of type `lang: `. The note will automatically be tagged with the language. These notes are typically filled by the Positron team. If you are an external contributor, you may ignore this section. --> #### New Features - N/A #### Bug Fixes - Fixed Quarto bundling on Windows ### QA Notes We need to get a Windows release build here, and then try to use `quarto::quarto_render()` for a small example file to render to PDF, something like this: ```` --- title: "Diamond sizes" format: pdf --- ```{r} #| label: setup #| include: false library(tidyverse) library(diamonds) smaller <- diamonds |> filter(carat <= 2.5) ``` We have data about `r nrow(diamonds)` diamonds. Only `r nrow(diamonds) - nrow(smaller)` are larger than 2.5 carats. The distribution of the remainder is shown below: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ```{r} #| label: plot-smaller-diamonds #| echo: false smaller |> ggplot(aes(x = carat)) + geom_freqpoly(binwidth = 0.03) ``` ```` After this change, you'll get an error about not having tinytex instead of a missing `before-bib.tex`.
1 parent 8cf8c56 commit f9d7b6e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

build/lib/quarto.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/lib/quarto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function getQuartoWindows(version: string): Stream {
3636
verbose: true,
3737
timeoutSeconds: 90,
3838
})
39-
.pipe(unzip());
39+
.pipe(unzip({ keepEmpty: true }));
4040
}
4141

4242
/**

0 commit comments

Comments
 (0)