diff options
Diffstat (limited to 'lua/aotrix')
| -rw-r--r-- | lua/aotrix/compile.lua | 8 |
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) |
