From 4ded85dfbf98fb91cd64116fe260cc9ff8d03ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3n=C3=A1n=20Carrigan?= Date: Sun, 26 Jun 2022 10:48:41 +0100 Subject: [PATCH] fix: default root to cwd in python detection --- lua/neotest-python/base.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/neotest-python/base.lua b/lua/neotest-python/base.lua index f8bd62a..f4f8159 100644 --- a/lua/neotest-python/base.lua +++ b/lua/neotest-python/base.lua @@ -25,6 +25,9 @@ local python_command_mem = {} ---@return string[] function M.get_python_command(root) + if not root then + root = vim.loop.cwd() + end if python_command_mem[root] then return python_command_mem[root] end