Skip to content

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented Dec 1, 2025

When ~/.TinyTeX/ directory exists without actual binaries, quarto check install reports:

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

The check passes with "Version: undefined", preventing fallback to valid TinyTeX installations in the system PATH.

Root Cause

The detection logic in src/tools/impl/tinytex-info.ts only verified the install directory exists, not the binaries within.

  • hasTinyTex() checked only if ~/.TinyTeX/ exists
  • tinyTexBinDir() constructed bin paths without validation on Linux/Mac (Windows already validated)

Fix

Added two-level validation:

  1. tinyTexBinDir() now validates the bin directory exists before returning paths on Linux/Mac, matching Windows behavior
  2. hasTinyTex() verifies the tlmgr binary exists within the bin directory

This ensures Quarto only reports TinyTeX as available when it contains working binaries, allowing proper fallback to PATH installations when the home directory installation is incomplete.

Fixes #13730

Quarto was incorrectly detecting TinyTeX when ~/.TinyTeX/ directory existed without binaries, reporting "Version: undefined" but marking the check as OK. This prevented fallback to valid TinyTeX installations in the system PATH.

The detection logic now validates both that the bin directory exists and contains the tlmgr binary before reporting TinyTeX as available.

Fixes #13730
@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Dec 1, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@cderv
Copy link
Collaborator Author

cderv commented Dec 1, 2025

@mcanouil would you be able to test this in your use case ?

Do you need a quarto.exe for it for easier testing ?

The logic is quite simple as discussed.

@cderv
Copy link
Collaborator Author

cderv commented Dec 1, 2025

You'll find the bundles as artifacts of this run: https://github.com/quarto-dev/quarto-cli/actions/runs/19828995939

If you can test it in your context. Thank you!

@mcanouil
Copy link
Collaborator

mcanouil commented Dec 1, 2025

I'll try to do that tomorrow or Wednesday.

@mcanouil
Copy link
Collaborator

mcanouil commented Dec 3, 2025

It works in the setup in which I discovered the issue.

docker run --rm -it --platform linux/amd64 --user vscode \
  ghcr.io/mcanouil/quarto-codespaces:release-202511122111 \
  bash -l
cd ~
git clone --branch fix/issue-13730 https://github.com/quarto-dev/quarto-cli
cd quarto-cli
sudo ./configure.sh
quarto check install

@cderv
Copy link
Collaborator Author

cderv commented Dec 3, 2025

Cool thank you !

@cderv cderv merged commit 3b905a2 into main Dec 3, 2025
69 checks passed
@cderv cderv deleted the fix/issue-13730 branch December 3, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quarto CLI incorrectly detects TinyTeX installation when ~/.TinyTeX/

4 participants