latex-doctor selects obsolete TeX Live bin before current 2026 installation
Codex LaTeX plugin latex-doctor appears to select an obsolete TeX Live bin directory before the current one.
Environment:
- Current PATH latexmk: /usr/local/texlive/2026/bin/universal-darwin/latexmk
- Version: Latexmk, John Collins, 9 March 2026. Version 4.88
- latex-doctor selected: /usr/local/texlive/p2009/bin/powerpc-apple-darwin8.11.0/latexmk
- Selected latexmk version: Version 4.10, 21 August 2009
Observed:
latex-doctor reports TeX bin:
/usr/local/texlive/p2009/bin/powerpc-apple-darwin8.11.0
It then runs:
/usr/local/texlive/p2009/bin/powerpc-apple-darwin8.11.0/latexmk -pdf -interaction=nonstopmode -halt-on-error -synctex=1 ...
This fails with:
Latexmk: -interaction=nonstopmode bad option
Latexmk: -halt-on-error bad option
Latexmk: -synctex=1 bad option
Expected:
latex-doctor should prefer the active/current TeX Live installation, especially /usr/local/texlive/2026/bin/universal-darwin when it is on PATH, and should ignore incompatible architecture directories or tools that cannot execute.
Likely cause:
scripts/detect_texlive.py uses:
sorted(glob.glob("/usr/local/texlive//bin/"), reverse=True)
Lexicographic reverse sorting puts /usr/local/texlive/p2009/... before /usr/local/texlive/2026/..., and the detector accepts paths even when version probing returns Bad CPU type or Exec format error.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗