File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 3131--- @return boolean ?
3232function M .start (filepath , port )
3333 local processes = utils .processes_listening_on_port (port )
34- if # processes > 0 then
34+ if # processes > 0 and process . status ~= 1 then
3535 for _ , process in ipairs (processes ) do
3636 if process .pid ~= vim .uv .os_getpid () then
3737 -- local kill_confirm = vim.fn.confirm(
Original file line number Diff line number Diff line change @@ -295,11 +295,11 @@ function M.processes_listening_on_port(port)
295295 local cmd_result = M .await_term_cmd (cmd )
296296 if not cmd_result then
297297 print (" Error getting processes listening on port " .. port )
298- return {}
298+ return {status = 1 }
299299 end
300300 if cmd_result .code ~= 0 then
301301 print (" Error getting processes listening on port " .. port .. " : " .. cmd_result .stderr )
302- return {}
302+ return {status = 1 }
303303 end
304304 local cmd_stdout = cmd_result .stdout
305305 if not cmd_stdout or cmd_stdout == " " then
You can’t perform that action at this time.
0 commit comments