Skip to content

Commit

Permalink
fix: error thrown in tasks.json does not contain tasks key (#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
Quitlox authored Jan 3, 2025
1 parent 9161b4d commit 8de1104
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lua/overseer/template/vscode/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,13 @@ return {
end
local ret = {}
local precalculated_vars = variables.precalculate_vars()

if content.tasks == nil then
vim.notify("No 'tasks' key found in '.vscode/tasks.json'", vim.log.levels.WARN)
cb({})
return
end

for _, task in ipairs(content.tasks) do
local defn = vim.tbl_deep_extend("force", global_defaults, task)
defn = vim.tbl_deep_extend("force", defn, task[os_key] or {})
Expand Down

0 comments on commit 8de1104

Please sign in to comment.