Skip to content

Commit b6611c2

Browse files
committed
fix: Fix error message when Overseer is running a job
`command` is not a field on `overseer.Task` leading to this error originating from check_active_job_and_notify(): "Error executing Lua callback: .../nvim/lazy/cmake-tools.nvim/lua/cmake-tools/overseer.lua:55: attempt to concatenate field 'command' (a nil value)" But `cmd` is a valid field. Though if the user gives the task a custom name then that's probably what they want to see.
1 parent 680a501 commit b6611c2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lua/cmake-tools/overseer.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ end
5050
function _overseer.has_active_job(opts)
5151
if _overseer.job ~= nil and _overseer.job:is_running() then
5252
log.error(
53-
"A CMake task is already running: "
54-
.. _overseer.job.command
55-
.. " Stop it before trying to run a new CMake task."
53+
"A CMake task is already running: `"
54+
.. (_overseer.job.name or _overseer.job.cmd)
55+
.. "` Stop it before trying to run a new CMake task."
5656
)
5757
return true
5858
end

0 commit comments

Comments
 (0)