aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/core/spawn.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim-lsp-installer/core/spawn.lua')
-rw-r--r--lua/nvim-lsp-installer/core/spawn.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/nvim-lsp-installer/core/spawn.lua b/lua/nvim-lsp-installer/core/spawn.lua
index 4776ff66..8ac06aa4 100644
--- a/lua/nvim-lsp-installer/core/spawn.lua
+++ b/lua/nvim-lsp-installer/core/spawn.lua
@@ -24,7 +24,11 @@ local spawn = {
local function Failure(err, cmd)
return Result.failure(setmetatable(err, {
__tostring = function()
- return ("spawn: %s failed with exit code %d"):format(cmd, err.exit_code)
+ if err.exit_code ~= nil then
+ return ("spawn: %s failed with exit code %d. %s"):format(cmd, err.exit_code, err.stderr or "")
+ else
+ return ("spawn: %s failed with no exit code. %s"):format(cmd, err.stderr or "")
+ end
end,
}))
end