feat: add user dirs to hilbish module search paths

native-modules
sammyette 2023-07-10 23:24:33 -04:00
parent 6d936506c8
commit 3f29dfecb2
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 4 additions and 1 deletions

View File

@ -5,7 +5,10 @@ local fs = require 'fs'
package.path = package.path .. ';' .. hilbish.dataDir .. '/?/init.lua' package.path = package.path .. ';' .. hilbish.dataDir .. '/?/init.lua'
.. ';' .. hilbish.dataDir .. '/?/?.lua' .. ";" .. hilbish.dataDir .. '/?.lua' .. ';' .. hilbish.dataDir .. '/?/?.lua' .. ";" .. hilbish.dataDir .. '/?.lua'
hilbish.module.paths = '?.so;?/?.so'
hilbish.module.paths = '?.so;?/?.so;'
.. hilbish.userDir.data .. 'hilbish/libs/?/?.so'
.. ";" .. hilbish.userDir.data .. 'hilbish/libs/?.so'
table.insert(package.searchers, function(module) table.insert(package.searchers, function(module)
local path = package.searchpath(module, hilbish.module.paths) local path = package.searchpath(module, hilbish.module.paths)