|
|
@ -1,15 +1,12 @@
|
|
|
|
-- Handle mismatch between homebrew's version of Lua and hammerspoon's version
|
|
|
|
-- Handle mismatch between homebrew's version of Lua and hammerspoon's version
|
|
|
|
local lVer = _VERSION:match("Lua (.+)$")
|
|
|
|
local lVer = _VERSION:match("Lua (.+)$")
|
|
|
|
-- local luarocks = hs.execute("which luarocks"):gsub("\n", "")
|
|
|
|
local luarocks = "/opt/homebrew/bin/luarocks"
|
|
|
|
local luarocks = "/usr/local/bin/luarocks"
|
|
|
|
package.path = package.path .. ";" .. hs.execute(
|
|
|
|
if #luarocks > 0 then
|
|
|
|
luarocks .. " --lua-version " .. lVer .. " path --lr-path"
|
|
|
|
package.path = package.path .. ";" .. hs.execute(
|
|
|
|
):gsub("\n", "")
|
|
|
|
luarocks .. " --lua-version " .. lVer .. " path --lr-path"
|
|
|
|
package.cpath = package.cpath .. ";" .. hs.execute(
|
|
|
|
):gsub("\n", "")
|
|
|
|
luarocks .. " --lua-version " .. lVer .. " path --lr-cpath"
|
|
|
|
package.cpath = package.cpath .. ";" .. hs.execute(
|
|
|
|
):gsub("\n", "")
|
|
|
|
luarocks .. " --lua-version " .. lVer .. " path --lr-cpath"
|
|
|
|
|
|
|
|
):gsub("\n", "")
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fennel = require "fennel"
|
|
|
|
fennel = require "fennel"
|
|
|
|
table.insert(package.loaders or package.searchers, fennel.searcher)
|
|
|
|
table.insert(package.loaders or package.searchers, fennel.searcher)
|
|
|
|