Skip to content

Commit

Permalink
feat(bootstrap): add Installation result detection (#20)
Browse files Browse the repository at this point in the history
* add Installation result detection

* chore: apply PR suggestion

---------

Co-authored-by: Marc Jakobi <[email protected]>
  • Loading branch information
jinzhongjia and mrcjkb authored Oct 31, 2023
1 parent a03500a commit bb532fb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/rocks/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ local rocks = {}

local function bootstrap_install(name, version)
local luarocks = require("rocks.luarocks")
luarocks
local obj = luarocks
.cli({
"install",
name,
version,
})
:wait()
if obj.code ~= 0 then
local err_msg=string.format("failed to bootstrap package %s, err is: %s", name, obj.stderr)
vim.notify(err_msg, vim.log.levels.ERROR)
end
end

---@package
Expand Down

0 comments on commit bb532fb

Please sign in to comment.