From eb811c4f0f223720ec72e120812cb51495c60c5e Mon Sep 17 00:00:00 2001 From: Aotrix <9aotrix@protonmail.com> Date: Sat, 27 Dec 2025 01:23:46 +0100 Subject: Fix escape bug for compile plugin --- lua/aotrix/compile.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lua') diff --git a/lua/aotrix/compile.lua b/lua/aotrix/compile.lua index fd59ead..3fcb54c 100644 --- a/lua/aotrix/compile.lua +++ b/lua/aotrix/compile.lua @@ -70,9 +70,11 @@ end ---@return nil function compileTarget() function compile(pTarget) - createFloatingTerminal() - local command = "cmake --build build --target " .. pTarget .. " && ./build/" .. pTarget - executeCommandInTerminal(command) + if not (pTarget == nil) and string.len(pTarget) > 0 then + createFloatingTerminal() + local command = "cmake --build build --target " .. pTarget .. " && ./build/" .. pTarget + executeCommandInTerminal(command) + end end chooseTarget(compile) -- cgit v1.2.3