diff options
Diffstat (limited to 'Master/texmf-dist/scripts/l3build/l3build-aux.lua')
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-aux.lua | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Master/texmf-dist/scripts/l3build/l3build-aux.lua b/Master/texmf-dist/scripts/l3build/l3build-aux.lua index dd8c410fc09..bf0b85c6989 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-aux.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-aux.lua @@ -189,9 +189,9 @@ function runcmd(cmd,dir,vars) dir = abspath(dir) vars = vars or {} -- Allow for local texmf files - local env = "" - if not match(checkformat,"^context$") then - env = os_setenv .. " TEXMFCNF=." .. os_pathsep .. os_concat + local env + if checkformat ~= "context" then + env = os_setenv .. " TEXMFCNF=." .. os_pathsep end local envpaths = "." .. localtexmf() .. os_pathsep .. abspath(localdir) .. os_pathsep @@ -201,11 +201,9 @@ function runcmd(cmd,dir,vars) envpaths = gsub(envpaths,'"','') end for _,var in pairs(vars) do - if env ~= "" then - env = env .. os_setenv .. " " .. var .. "=" .. envpaths .. os_concat - else - env = os_setenv .. " " .. var .. "=" .. envpaths - end + env = (env and (env .. os_concat) or "") + .. os_setenv .. " " .. var .. "=" .. envpaths end - return run(dir,set_epoch_cmd(epoch, forcedocepoch) .. env .. cmd) + return run(dir,set_epoch_cmd(epoch, forcedocepoch) + .. (env and (env .. os_concat) or "") .. cmd) end |