Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Water-Melon committed Jun 25, 2024
1 parent a9a3ddd commit fda9904
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion customize/packer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,19 @@ local function get_plugins()
return plugins
end

local function install_luarocks_admin()
local cmd = "luarocks-admin --version"
local ok, _, sout, serr = execex(cmd)
if not ok then
fail(("failed to install luarocks-admin. failed with\n%s\n%s"):format(cmd, sout, serr))
end
end

local function get_rocks()
local cmd = "luarocks list --tree=system --porcelain"
local ok, _, sout, serr = execex(cmd)
if not ok then
fail(("failed to retrieve list of installed rocks: '%s' failed with\n%s\n%s"):format(
fail(("failed to retrieve list of installed rocks: '%s' failed with\n%s\n%s\n%s"):format(
cmd, sout, serr))
end

Expand Down Expand Up @@ -290,6 +297,9 @@ header("Get arguments")
local rocks = get_args()


header("Install luarocks-admin")
install_luarocks_admin()

header("Get existing rocks")
local pre_installed_rocks = get_rocks()

Expand Down

0 comments on commit fda9904

Please sign in to comment.