Skip to content

Commit

Permalink
fix(installer): print stderr + stdout on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Jan 27, 2024
1 parent 298e10a commit 1c5efc9
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions installer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ local function set_up_luarocks(install_path)
}):wait()

if sc.code ~= 0 then
vim.notify("Cloning luarocks failed: " .. sc.stderr, vim.log.levels.ERROR)
vim.notify(
("Cloning luarocks failed.\nstderr: {}\nstdout: {}"):format(sc.stderr, sc.stdout),
vim.log.levels.ERROR
)
return false
end

Expand All @@ -182,7 +185,10 @@ local function set_up_luarocks(install_path)
}):wait()

if sc.code ~= 0 then
vim.notify("Configuring luarocks failed: " .. sc.stderr, vim.log.levels.ERROR)
vim.notify(
("Pinning luarocks failed.\nstderr: {}\nstdout: {}"):format(sc.stderr, sc.stdout),
vim.log.levels.ERROR
)
return false
end

Expand All @@ -197,7 +203,10 @@ local function set_up_luarocks(install_path)
}):wait()

if sc.code ~= 0 then
vim.notify("Configuring luarocks failed: " .. sc.stderr, vim.log.levels.ERROR)
vim.notify(
("Configuring luarocks failed.\nstderr: {}\nstdout: {}"):format(sc.stderr, sc.stdout),
vim.log.levels.ERROR
)
return false
end

Expand All @@ -211,7 +220,10 @@ local function set_up_luarocks(install_path)
}):wait()

if sc.code ~= 0 then
vim.notify("Installing luarocks failed: " .. sc.stderr, vim.log.levels.ERROR)
vim.notify(
("Installing luarocks failed.\nstderr: {}\nstdout: {}"):format(sc.stderr, sc.stdout),
vim.log.levels.ERROR
)
return false
end

Expand Down

0 comments on commit 1c5efc9

Please sign in to comment.