Help #68 with (hopefully) more error output

This commit is contained in:
Rene Schallner
2022-01-18 20:14:20 +01:00
parent 42241c1e15
commit 5d32eb2fe1

View File

@@ -112,9 +112,14 @@ M.do_find_all_tags = function(opts)
args = args, args = args,
enable_recording = true, enable_recording = true,
on_exit = function(j, return_val) on_exit = function(j, return_val)
if return_val == 0 then
for _, line in pairs(j:result()) do for _, line in pairs(j:result()) do
parse_entry(opts, line, ret) parse_entry(opts, line, ret)
end end
else
print("rg return value: " .. tostring(return_val))
print("stderr: ", vim.inspect(j:stderr_result()))
end
end, end,
on_stderr = function(err, data, _) on_stderr = function(err, data, _)
print("error: " .. tostring(err) .. "data: " .. data) print("error: " .. tostring(err) .. "data: " .. data)