mirror of https://github.com/Hilbis/Hilbish
fix: check and print module isnt found instead of failing
parent
179947cd98
commit
f741c2709c
|
@ -72,6 +72,10 @@ These are the global Hilbish functions that are always available and not part of
|
||||||
subdocName = 'index'
|
subdocName = 'index'
|
||||||
end
|
end
|
||||||
f = io.open(moddocPath .. subdocName .. '.txt', 'rb')
|
f = io.open(moddocPath .. subdocName .. '.txt', 'rb')
|
||||||
|
if not f then
|
||||||
|
print('No documentation found for ' .. mod .. '.')
|
||||||
|
return
|
||||||
|
end
|
||||||
funcdocs = f:read '*a'
|
funcdocs = f:read '*a'
|
||||||
local subdocs = table.map(fs.readdir(moddocPath), function(f)
|
local subdocs = table.map(fs.readdir(moddocPath), function(f)
|
||||||
return lunacolors.underline(lunacolors.blue(string.gsub(f, '.txt', '')))
|
return lunacolors.underline(lunacolors.blue(string.gsub(f, '.txt', '')))
|
||||||
|
|
Loading…
Reference in New Issue