Skip to content

Commit

Permalink
🐛 Fix loadfile()
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Feb 2, 2025
1 parent c604337 commit 43b23f9
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions lua/texrocks/config.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
-- luacheck: ignore 111 113
---@diagnostic disable: undefined-global
-- ~/.config/texmf/init.lua
local home = os.getenv('HOME')
loadfile(home .. '/.config/texmf/init.lua')()
local c = config or {}
config = nil
c.rocks_path = c.rocks_path or home .. '/.local/share/texmf'
c.luarocks_config_path = c.luarocks_config_path or home .. '/.luarocks/config-5.3.lua'
c.luarocks_binary = c.luarocks_binary or 'luarocks'
return c
local config = {
rocks_path = home .. '/.local/share/texmf',
luarocks_config_path = home .. '/.luarocks/config-5.3.lua',
luarocks_binary = 'luarocks'
}
loadfile(home .. '/.config/texmf/init.lua', 't', config)()
return config

0 comments on commit 43b23f9

Please sign in to comment.