Skip to content

Commit cdea29f

Browse files
committed
🐛 Restore package.path, package.cpath
1 parent a9b8007 commit cdea29f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

bin/nvimp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
local string = require "string"
33
local package = require "package"
44
local version = string.gsub(_VERSION, ".* ", "")
5+
local path = package.path
6+
local cpath = package.cpath
57
package.path = package.path .. ";/usr/share/lua/" .. version .. "/?.lua;/usr/share/lua/" .. version .. "/?/init.lua"
68
local ext = string.match(package.cpath, '([^.]+)[;|$]')
79
package.cpath = package.cpath .. ";/usr/lib/lua/" .. version .. "/?." .. ext
@@ -30,4 +32,6 @@ for _, name in ipairs { os.getenv('HOME') .. '/.luaprc.lua',
3032
end
3133
end
3234

35+
package.path = path
36+
package.cpath = cpath
3337
prompt.enter()

bin/texluap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
local string = require "string"
33
local package = require "package"
44
local version = string.gsub(_VERSION, ".* ", "")
5+
local path = package.path
6+
local cpath = package.cpath
57
package.path = package.path .. ";/usr/share/lua/" .. version .. "/?.lua;/usr/share/lua/" .. version .. "/?/init.lua"
68
local ext = string.match(package.cpath, '([^.]+)[;|$]')
79
package.cpath = package.cpath .. ";/usr/lib/lua/" .. version .. "/?." .. ext
@@ -30,4 +32,6 @@ for _, name in ipairs { os.getenv('HOME') .. '/.luaprc.lua',
3032
end
3133
end
3234

35+
package.path = path
36+
package.cpath = cpath
3337
prompt.enter()

0 commit comments

Comments
 (0)