1
0
Fork 0
mirror of https://github.com/Reuh/candran.git synced 2025-10-27 09:59:29 +00:00

Merge branch 'master' into macros

This commit is contained in:
Étienne Fildadut 2021-06-11 13:15:51 +02:00
commit a0eda5bc72
3 changed files with 4 additions and 4 deletions

View file

@ -15,7 +15,7 @@ if args.help or args.h then
print("Default options:")
for opt, val in pairs(candran.default) do
if type(val) == "string" then val = val:gsub("\n", "\\n") end
print((" %s=%q"):format(opt, val))
print((" %s=%q"):format(opt, tostring(val)))
end
return
end

View file

@ -23,7 +23,7 @@ if #arg < 1 or args.help or args.h then
print("Default options:")
for opt, val in pairs(candran.default) do
if type(val) == "string" then val = val:gsub("\n", "\\n") end
print((" %s=%q"):format(opt, val))
print((" %s=%q"):format(opt, tostring(val)))
end
return
end

View file

@ -234,7 +234,7 @@ local codeCache = {}
function candran.loadfile(filepath, env, options)
local f, err = io.open(filepath)
if not f then
return nil, "cannot open %s":format(err)
return nil, "cannot open %s":format(tostring(err))
end
local content = f:read("*a")
f:close()
@ -352,7 +352,7 @@ function candran.searcher(modpath)
if r then
return r(modpath, filepath)
else
error("error loading candran module '%s' from file '%s':\n\t%s":format(modpath, filepath, s), 0)
error("error loading candran module '%s' from file '%s':\n\t%s":format(modpath, filepath, tostring(s)), 0)
end
end, filepath
end