summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAotrix <[email protected]>2025-12-27 01:23:46 +0100
committerAotrix <[email protected]>2025-12-27 01:23:46 +0100
commiteb811c4f0f223720ec72e120812cb51495c60c5e (patch)
tree4a31399ef5a9e8e6d377cd7f7e4c1c956c5d544b
parent310cf16cbc9cc9392c16cac7cac615745ee6c6a0 (diff)
Fix escape bug for compile plugin
-rw-r--r--lua/aotrix/compile.lua8
1 files changed, 5 insertions, 3 deletions
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)