1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-26 21:27:40 +00:00

require order issue

This commit is contained in:
kepler155c@gmail.com
2018-12-30 06:50:59 -05:00
parent f19d439314
commit 852bf3f6a6
2 changed files with 28 additions and 6 deletions

View File

@@ -13,19 +13,19 @@ local helpPaths = Util.split(help.path(), '(.-):')
table.insert(helpPaths, '/sys/help')
local function addEntry(t, e)
local function addEntry(t, e, n)
for _,v in ipairs(t) do
if v == e then
return true
end
end
table.insert(t, 1, e)
table.insert(t, n or 1, e)
end
local function addRequirePath(t, path)
addEntry(t, string.format('/%s/?', path))
addEntry(t, string.format('/%s/?.lua', path))
addEntry(t, string.format('/%s/?/init.lua', path))
addEntry(t, string.format('/%s/?/init.lua', path), 7)
addEntry(t, string.format('/%s/?.lua', path), 7)
addEntry(t, string.format('/%s/?', path), 7)
end
for name in pairs(Packages:installed()) do