Clear default Lua require path (#1085)

This is mainly done to avoid requiring from the current working 
directory of the editor.

This also avoids requiring from system paths, as it was already the case 
for the native modules search path.
This commit is contained in:
Guldoman 2022-08-03 17:13:26 +02:00 committed by GitHub
parent 2667f9476b
commit 4db71836af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ USERDIR = (system.get_file_info(EXEDIR .. '/user') and (EXEDIR .. '/user'))
or ((os.getenv("XDG_CONFIG_HOME") and os.getenv("XDG_CONFIG_HOME") .. "/lite-xl"))
or (HOME and (HOME .. '/.config/lite-xl'))
package.path = DATADIR .. '/?.lua;' .. package.path
package.path = DATADIR .. '/?.lua;'
package.path = DATADIR .. '/?/init.lua;' .. package.path
package.path = USERDIR .. '/?.lua;' .. package.path
package.path = USERDIR .. '/?/init.lua;' .. package.path