summaryrefslogtreecommitdiff
path: root/tex/context/base/luat-cod.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/luat-cod.lua')
-rw-r--r--tex/context/base/luat-cod.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/tex/context/base/luat-cod.lua b/tex/context/base/luat-cod.lua
index 8b015477f..c436ee6d7 100644
--- a/tex/context/base/luat-cod.lua
+++ b/tex/context/base/luat-cod.lua
@@ -51,6 +51,9 @@ function lua.registercode(filename,version)
bytecode[n] = code
lua.lastbytecode = n
end
+ elseif environment.initex then
+ texio.write_nl("\nerror loading file: " .. filename .. " (aborting)")
+ os.exit()
end
end
end
@@ -85,7 +88,7 @@ local environment = environment
-- no string.unquoted yet
local sourcefile = gsub(arg and arg[1] or "","^\"(.*)\"$","%1")
-local sourcepath = find(sourcefile,"/") and gsub(sourcefile,"/[^/]+$","") or ""
+local sourcepath = find(sourcefile,"/",1,true) and gsub(sourcefile,"/[^/]+$","") or ""
local targetpath = "."
-- delayed (via metatable):
@@ -159,7 +162,7 @@ local function target_file(name)
return targetpath .. "/" .. name
end
-local function find_read_file (id,name)
+local function find_read_file(id,name)
return source_file(name)
end