[latex3-commits] [git/LaTeX3-latex3-luaotfload] modules: Handle missing configuration files (1933548)

Marcel Fabian Krüger tex at 2krueger.de
Sun May 24 15:51:07 CEST 2020


Repository : https://github.com/latex3/luaotfload
On branch  : modules
Link       : https://github.com/latex3/luaotfload/commit/1933548bce1442262be91d5d4a4d7cbb6ace0575

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

commit 1933548bce1442262be91d5d4a4d7cbb6ace0575
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sun May 24 15:51:07 2020 +0200

    Handle missing configuration files


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

1933548bce1442262be91d5d4a4d7cbb6ace0575
 src/luaotfload-configuration.lua | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/luaotfload-configuration.lua b/src/luaotfload-configuration.lua
index 1719bbe..41aca9e 100644
--- a/src/luaotfload-configuration.lua
+++ b/src/luaotfload-configuration.lua
@@ -907,21 +907,23 @@ local function apply (new, ...)
   if new == nil then
     return reconfigure()
   end
-  for name, section in next, new do
-    local t_section = type (section)
-    if t_section ~= table_t then
-      logreport ("both", 1, "conf",
-                 "Error applying configuration: entry %s is %s, expected table.",
-                 section, t_section)
-      --- ignore
-    else
-      local currentsection = config[name]
-      for var, val in next, section do
-        currentsection[var] = val
+  if new then
+    for name, section in next, new do
+      local t_section = type (section)
+      if t_section ~= table_t then
+        logreport ("both", 1, "conf",
+                   "Error applying configuration: entry %s is %s, expected table.",
+                   section, t_section)
+        --- ignore
+      else
+        local currentsection = config[name]
+        for var, val in next, section do
+          currentsection[var] = val
+        end
       end
     end
+    config.status = luaotfloadstatus
   end
-  config.status = luaotfloadstatus
   return apply (...)
 end
 





More information about the latex3-commits mailing list.