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:
parent
2667f9476b
commit
4db71836af
|
@ -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 ((os.getenv("XDG_CONFIG_HOME") and os.getenv("XDG_CONFIG_HOME") .. "/lite-xl"))
|
||||||
or (HOME and (HOME .. '/.config/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 = DATADIR .. '/?/init.lua;' .. package.path
|
||||||
package.path = USERDIR .. '/?.lua;' .. package.path
|
package.path = USERDIR .. '/?.lua;' .. package.path
|
||||||
package.path = USERDIR .. '/?/init.lua;' .. package.path
|
package.path = USERDIR .. '/?/init.lua;' .. package.path
|
||||||
|
|
Loading…
Reference in New Issue