Update c.lua

This commit is contained in:
DarthMooMancer
2025-03-10 14:30:39 -04:00
parent b59701b1a2
commit 8eb672c4a1
+4 -1
View File
@@ -293,6 +293,7 @@ function M.run()
local build_dir = project_root .. "/build"
local files = vim.fn.glob(build_dir .. "/*.txt", true, true)
local project_name = nil
for _, file in ipairs(files) do
if vim.fn.match(file, "CMakeCache.txt") == -1 then
@@ -306,7 +307,9 @@ function M.run()
return
end
M.open_float_terminal("cd " .. build_dir .. " && ." .. project_name)
-- Ensure the project_name is being used correctly in the command
local executable_path = build_dir .. "/" .. project_name
M.open_float_terminal("cd " .. build_dir .. " && ./" .. project_name)
end
return M