From 80366bb96e78bed45991068f41b14acbe49e4b7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3n=C3=A1n=20Carrigan?= Date: Sat, 15 Jul 2023 19:48:33 +0100 Subject: [PATCH] fix(dap): handle no exited event See #200 --- lua/neotest/client/strategies/dap/init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/neotest/client/strategies/dap/init.lua b/lua/neotest/client/strategies/dap/init.lua index 6b36f765..486bd088 100644 --- a/lua/neotest/client/strategies/dap/init.lua +++ b/lua/neotest/client/strategies/dap/init.lua @@ -52,6 +52,11 @@ return function(spec) return adapter_before and adapter_before() or config end, after = function() + local received_exit = result_code ~= nil + if not received_exit then + result_code = 0 + pcall(finish_future.set) + end dap.listeners.after.event_output[handler_id] = nil dap.listeners.after.event_exited[handler_id] = nil if adapter_after then