Skip to content

Commit 3c2de37

Browse files
committed
debug: include shell command in error message
1 parent da93d55 commit 3c2de37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lua/oil/shell.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ M.run = function(cmd, opts, callback)
2626
if err == "" then
2727
err = "Unknown error"
2828
end
29-
callback(err)
29+
local cmd_str = type(cmd) == "string" and cmd or table.concat(cmd, " ")
30+
callback(string.format("Error running command '%s'\n%s", cmd_str, err))
3031
end
3132
end),
3233
})

0 commit comments

Comments
 (0)