From 3867a81bb2e475c93c744ac39ac76d442d85aa1e Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 22 Jun 2023 10:47:48 +0200 Subject: [PATCH] style: better uv annotations --- lua/lazy/manage/process.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lua/lazy/manage/process.lua b/lua/lazy/manage/process.lua index 04b31bb..9b7fef4 100644 --- a/lua/lazy/manage/process.lua +++ b/lua/lazy/manage/process.lua @@ -2,7 +2,7 @@ local Config = require("lazy.core.config") local M = {} ----@type table +---@type table M.running = {} M.signals = { @@ -75,10 +75,10 @@ function M.spawn(cmd, opts) local stderr = assert(uv.new_pipe()) local output = "" - ---@type uv.uv_process_t + ---@type uv_process_t? local handle = nil - ---@type uv.uv_timer_t + ---@type uv_timer_t local timeout local killed = false if opts.timeout then @@ -96,6 +96,7 @@ function M.spawn(cmd, opts) cwd = opts.cwd, env = env_flat, }, function(exit_code, signal) + ---@cast handle uv_process_t M.running[handle] = nil if timeout then timeout:stop()