fix(scraper): hoist timer declaration before spawn closure

This commit is contained in:
Barrett Ruth 2026-03-05 11:16:51 -05:00
parent 68aa4a81ac
commit 458c8de119

View file

@ -85,6 +85,7 @@ local function run_scraper(platform, subcommand, args, opts)
local stderr = uv.new_pipe(false)
local buf = ''
local timer = nil
local handle
handle = uv.spawn(cmd[1], {
args = vim.list_slice(cmd, 2),
@ -128,7 +129,6 @@ local function run_scraper(platform, subcommand, args, opts)
return { success = false, error = 'spawn failed' }
end
local timer = nil
if subcommand == 'submit' then
timer = uv.new_timer()
timer:start(120000, 0, function()