From 458c8de11922bb220f415f205cba884844193b88 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Thu, 5 Mar 2026 11:16:51 -0500 Subject: [PATCH] fix(scraper): hoist `timer` declaration before spawn closure --- lua/cp/scraper.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/cp/scraper.lua b/lua/cp/scraper.lua index a600e95..6980c7d 100644 --- a/lua/cp/scraper.lua +++ b/lua/cp/scraper.lua @@ -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()