[latex3-commits] [git/l3build] config: Check configuration actually exists (7f0f7da)

Joseph Wright joseph.wright at morningstar2.co.uk
Thu Dec 7 10:31:45 CET 2017


Repository : https://github.com/latex3/l3build
On branch  : config
Link       : https://github.com/latex3/l3build/commit/7f0f7dadca4838275553a644c70e1f6b0d05d463

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

commit 7f0f7dadca4838275553a644c70e1f6b0d05d463
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Thu Dec 7 09:31:45 2017 +0000

    Check configuration actually exists


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

7f0f7dadca4838275553a644c70e1f6b0d05d463
 l3build.lua |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/l3build.lua b/l3build.lua
index f182ddb..3746a04 100644
--- a/l3build.lua
+++ b/l3build.lua
@@ -2509,7 +2509,13 @@ end
 if #checkconfigs == 1 and
    checkconfigs[1] ~= stdconfig and
    (options["target"] == "check" or options["target"] == "save") then
-   dofile("./" .. checkconfigs[1] .. ".lua")
+   local config = "./" .. checkconfigs[1] .. ".lua"
+   if fileexists(config) then
+     dofile(config)
+   else
+     print("Error: Cannot find configuration " ..  checkconfigs[1])
+     exit(1)
+   end
 end
 
 -- Call the main function





More information about the latex3-commits mailing list