Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions news/changelog-1.10.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
All changes included in 1.10:

# v1.11 backports

## In this release

- ([#14731](https://github.com/quarto-dev/quarto-cli/pull/14731)): Fix `QUARTO_VENDOR_BINARIES=false` builds silently succeeding with missing binaries. The `configure` step's "is it on PATH?" check for `typst-gather`, `typst`, `pandoc` and `esbuild` compared an unawaited `Promise` against `undefined`, so the guard never fired. A build with `typst-gather` neither vendored nor on PATH reported success and produced a Quarto tree without it, surfacing only at render time as `typst-gather analyze failed; staging all packages as fallback`. The missing-binary error message now also names the path that was checked and the `QUARTO_TYPST_GATHER` environment variable.

# v1.10 changes

## Regression fixes

- ([#13583](https://github.com/quarto-dev/quarto-cli/issues/13583)): Fix "Show All Code" and "Hide All Code" in the `code-tools` menu doing nothing when `code-copy` is enabled. (author: @mcanouil)
Expand Down
2 changes: 1 addition & 1 deletion package/src/common/dependencies/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function esBuild(version: string): Dependency {
}
} else {
// verify that the binary is on PATH, but otherwise don't do anything
if (which(file) === undefined) {
if ((await which(file)) === undefined) {
throw new Error(
`${file} is not on PATH. Please install it and add it to PATH.`,
);
Expand Down
2 changes: 1 addition & 1 deletion package/src/common/dependencies/pandoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function pandoc(version: string): Dependency {
}
} else {
// verify that the binary is on PATH, but otherwise don't do anything
if (which(pandocBinary) === undefined) {
if ((await which(pandocBinary)) === undefined) {
throw new Error(
`${pandocBinary} is not on PATH. Please install it and add it to PATH.`,
);
Expand Down
2 changes: 1 addition & 1 deletion package/src/common/dependencies/typst-gather.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function typstGather(version: string): Dependency {
Deno.renameSync(extractedPath, join(targetDir, file));
} else {
// verify that the binary is on PATH, but otherwise don't do anything
if (which(file) === undefined) {
if ((await which(file)) === undefined) {
throw new Error(
`${file} is not on PATH. Please install it and add it to PATH.`,
);
Expand Down
2 changes: 1 addition & 1 deletion package/src/common/dependencies/typst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function typst(version: string ): Dependency {
}
} else {
// verify that the binary is on PATH, but otherwise don't do anything
if (which(file) === undefined) {
if ((await which(file)) === undefined) {
throw new Error(
`${file} is not on PATH. Please install it and add it to PATH.`,
);
Expand Down
15 changes: 11 additions & 4 deletions src/command/dev-call/typst-gather/cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@ export const typstGatherCommand = new Command()
const typstGatherBinary = Deno.env.get("QUARTO_TYPST_GATHER") ||
architectureToolsPath(binaryName);
if (!existsSync(typstGatherBinary)) {
error(
`typst-gather binary not found.\n` +
"Run ./configure.sh to build and install it.",
);
error(`typst-gather binary not found at ${typstGatherBinary}.`);
if (Deno.env.get("QUARTO_TYPST_GATHER")) {
error(
"QUARTO_TYPST_GATHER is set but does not point to an existing file.",
);
} else {
error(
"Run ./configure.sh to download it, or set QUARTO_TYPST_GATHER to " +
"the path of a typst-gather binary.",
);
}
Deno.exit(1);
}

Expand Down
8 changes: 6 additions & 2 deletions src/core/typst-gather.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ export function typstGatherBinaryPath(): string {

if (!existsSync(binary)) {
throw new Error(
`typst-gather binary not found.\n` +
`Run ./configure.sh to build and install it.`,
`typst-gather binary not found at ${binary}.\n` +
(Deno.env.get("QUARTO_TYPST_GATHER")
? `QUARTO_TYPST_GATHER is set but does not point to an existing file.`
: `Reinstall Quarto to restore the bundled binary, or set ` +
`QUARTO_TYPST_GATHER to the path of a typst-gather binary.\n` +
`In a Quarto source checkout, run ./configure.sh to download it.`),
);
}

Expand Down
Loading