[latex3-commits] [git/LaTeX3-latex3-l3build] master: Ensure texmfdir exists before adding to search path (b587162)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Sep 29 08:42:11 CEST 2019


Repository : https://github.com/latex3/l3build
On branch  : master
Link       : https://github.com/latex3/l3build/commit/b587162236149d0fab55b3e5b815d274a00f0686

>---------------------------------------------------------------

commit b587162236149d0fab55b3e5b815d274a00f0686
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Sep 29 07:42:11 2019 +0100

    Ensure texmfdir exists before adding to search path


>---------------------------------------------------------------

b587162236149d0fab55b3e5b815d274a00f0686
 CHANGELOG.md            | 4 ++++
 l3build-check.lua       | 3 +--
 l3build-typesetting.lua | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 09be887..7b519fe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ this project uses date-based 'snapshot' version identifiers.
 
 ## [Unreleased]
 
+### Fixed
+
+- Path searching if `texmfdir` is set but does not exist
+
 ## [2019-09-28]
 
 ### Fixed
diff --git a/l3build-check.lua b/l3build-check.lua
index 731d428..aad0328 100644
--- a/l3build-check.lua
+++ b/l3build-check.lua
@@ -722,10 +722,9 @@ function runtest(name, engine, hide, ext, pdfmode, breakout)
   rm(testdir,name .. logext)
   local errlevels = {}
   local localtexmf = ""
-  if texmfdir and texmfdir ~= "" then
+  if texmfdir and texmfdir ~= "" and direxists(texmfdir) then
     localtexmf = os_pathsep .. abspath(texmfdir) .. "//"
   end
-  local texmfdir = abspath(texmfdir) .. "//"
   for i = 1, checkruns do
     errlevels[i] = run(
       testdir,
diff --git a/l3build-typesetting.lua b/l3build-typesetting.lua
index 7c06403..7f588a7 100644
--- a/l3build-typesetting.lua
+++ b/l3build-typesetting.lua
@@ -64,7 +64,7 @@ function runcmd(cmd,dir,vars)
   -- Allow for local texmf files
   local env = os_setenv .. " TEXMFCNF=." .. os_pathsep
   local localtexmf = ""
-  if texmfdir and texmfdir ~= "" then
+  if texmfdir and texmfdir ~= "" and direxists(texmfdir) then
     localtexmf = os_pathsep .. abspath(texmfdir) .. "//"
   end
   local envpaths = "." .. localtexmf .. os_pathsep





More information about the latex3-commits mailing list