Fix for error reporting not finding core files
This commit is contained in:
parent
7f30fb293f
commit
f0f3c7e0bb
2
Makefile
2
Makefile
@ -84,7 +84,7 @@ install: lua version optimize optimize_extra
|
||||
fi; \
|
||||
version="`cat version`"; \
|
||||
mkdir -pv $$prefix/bin $$prefix/lib/nomsu/$$version $$prefix/share/nomsu/$$version $$prefix/share/man/man1 $$packagepath/nomsu \
|
||||
&& echo "#!$(LUA_BIN)\\nlocal NOMSU_PREFIX, NOMSU_PACKAGEPATH = [[$$prefix]], [[$$packagepath/nomsu]]" \
|
||||
&& echo "#!$(LUA_BIN)\\nNOMSU_PREFIX, NOMSU_PACKAGEPATH = [[$$prefix]], [[$$packagepath/nomsu]]" \
|
||||
| cat - nomsu.lua > $$prefix/bin/nomsu$$version \
|
||||
&& chmod +x $$prefix/bin/nomsu$$version \
|
||||
&& cp -v nomsu $$prefix/bin \
|
||||
|
@ -36,6 +36,15 @@ fail_at = function(source, msg)
|
||||
if source and not file then
|
||||
file = Files.read(source.filename)
|
||||
end
|
||||
if not file then
|
||||
if NOMSU_PREFIX then
|
||||
local path = tostring(NOMSU_PREFIX) .. "/share/nomsu/" .. tostring(table.concat(NOMSU_VERSION, ".")) .. "/" .. tostring(source.filename)
|
||||
file = Files.read(path)
|
||||
end
|
||||
end
|
||||
if not file then
|
||||
error("Can't find file: " .. tostring(source.filename))
|
||||
end
|
||||
local title, err_msg, hint = msg:match("([^:]*):[ \n]+(.*)[ \n]+Hint: (.*)")
|
||||
if not err_msg then
|
||||
err_msg, hint = msg:match("(.*)[ \n]+Hint:[ \n]+(.*)")
|
||||
|
@ -30,6 +30,12 @@ fail_at = (source, msg)->
|
||||
|
||||
if source and not file
|
||||
file = Files.read(source.filename)
|
||||
if not file
|
||||
if NOMSU_PREFIX
|
||||
path = "#{NOMSU_PREFIX}/share/nomsu/#{table.concat NOMSU_VERSION, "."}/#{source.filename}"
|
||||
file = Files.read(path)
|
||||
if not file
|
||||
error("Can't find file: "..tostring(source.filename))
|
||||
|
||||
title, err_msg, hint = msg\match("([^:]*):[ \n]+(.*)[ \n]+Hint: (.*)")
|
||||
if not err_msg
|
||||
|
Loading…
Reference in New Issue
Block a user