diff options
-rwxr-xr-x | Master/texmf-dist/scripts/context/lua/luatools.lua | 7 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/context/stubs/mswin/luatools.lua | 7 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/context/stubs/unix/luatools | 7 |
3 files changed, 15 insertions, 6 deletions
diff --git a/Master/texmf-dist/scripts/context/lua/luatools.lua b/Master/texmf-dist/scripts/context/lua/luatools.lua index f2716ab7a6a..51c8751abf4 100755 --- a/Master/texmf-dist/scripts/context/lua/luatools.lua +++ b/Master/texmf-dist/scripts/context/lua/luatools.lua @@ -6116,8 +6116,11 @@ function resolvers.expand_variables() local expansions, environment, variables = { }, instance.environment, instance.variables local env = resolvers.env instance.expansions = expansions - if instance.engine ~= "" then environment['engine'] = instance.engine end - if instance.progname ~= "" then environment['progname'] = instance.progname end + local engine, progname = instance.engine, instance.progname + if type(engine) ~= "string" then instance.engine, engine = "", "" end + if type(progname) ~= "string" then instance.progname, progname = "", "" end + if engine ~= "" then environment['engine'] = engine end + if progname ~= "" then environment['progname'] = progname end for k,v in next, environment do local a, b = match(k,"^(%a+)%_(.*)%s*$") if a and b then diff --git a/Master/texmf-dist/scripts/context/stubs/mswin/luatools.lua b/Master/texmf-dist/scripts/context/stubs/mswin/luatools.lua index f2716ab7a6a..51c8751abf4 100755 --- a/Master/texmf-dist/scripts/context/stubs/mswin/luatools.lua +++ b/Master/texmf-dist/scripts/context/stubs/mswin/luatools.lua @@ -6116,8 +6116,11 @@ function resolvers.expand_variables() local expansions, environment, variables = { }, instance.environment, instance.variables local env = resolvers.env instance.expansions = expansions - if instance.engine ~= "" then environment['engine'] = instance.engine end - if instance.progname ~= "" then environment['progname'] = instance.progname end + local engine, progname = instance.engine, instance.progname + if type(engine) ~= "string" then instance.engine, engine = "", "" end + if type(progname) ~= "string" then instance.progname, progname = "", "" end + if engine ~= "" then environment['engine'] = engine end + if progname ~= "" then environment['progname'] = progname end for k,v in next, environment do local a, b = match(k,"^(%a+)%_(.*)%s*$") if a and b then diff --git a/Master/texmf-dist/scripts/context/stubs/unix/luatools b/Master/texmf-dist/scripts/context/stubs/unix/luatools index f2716ab7a6a..51c8751abf4 100755 --- a/Master/texmf-dist/scripts/context/stubs/unix/luatools +++ b/Master/texmf-dist/scripts/context/stubs/unix/luatools @@ -6116,8 +6116,11 @@ function resolvers.expand_variables() local expansions, environment, variables = { }, instance.environment, instance.variables local env = resolvers.env instance.expansions = expansions - if instance.engine ~= "" then environment['engine'] = instance.engine end - if instance.progname ~= "" then environment['progname'] = instance.progname end + local engine, progname = instance.engine, instance.progname + if type(engine) ~= "string" then instance.engine, engine = "", "" end + if type(progname) ~= "string" then instance.progname, progname = "", "" end + if engine ~= "" then environment['engine'] = engine end + if progname ~= "" then environment['progname'] = progname end for k,v in next, environment do local a, b = match(k,"^(%a+)%_(.*)%s*$") if a and b then |