From 3c62386a396ae0c1cd7adbaacc379eb4af072a65 Mon Sep 17 00:00:00 2001 From: William Boman Date: Mon, 15 Aug 2022 21:03:06 +0200 Subject: refactor: introduce selene, harden type defs, and use proper EmmyLua syntax (#296) --- lua/mason-core/spawn.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lua/mason-core/spawn.lua') diff --git a/lua/mason-core/spawn.lua b/lua/mason-core/spawn.lua index 305bbc12..dfd63e83 100644 --- a/lua/mason-core/spawn.lua +++ b/lua/mason-core/spawn.lua @@ -41,13 +41,13 @@ local is_executable = _.memoize(function(cmd) end, _.identity) ---@class SpawnArgs ----@field with_paths string[]: (optional) Paths to add to the PATH environment variable. ----@field env table: (optional) Example { SOME_ENV = "value", SOME_OTHER_ENV = "some_value" } ----@field env_raw string[]: (optional) Example: { "SOME_ENV=value", "SOME_OTHER_ENV=some_value" } ----@field stdio_sink StdioSink: (optional) If provided, will be used to write to stdout and stderr. ----@field cwd string: (optional) ----@field on_spawn (fun(handle: luv_handle, stdio: luv_pipe[])): (optional) Will be called when the process successfully spawns. ----@field check_executable boolean: (optional) Whether to check if the provided command is executable (defaults to true). +---@field with_paths string[]? Paths to add to the PATH environment variable. +---@field env table? Example { SOME_ENV = "value", SOME_OTHER_ENV = "some_value" } +---@field env_raw string[]? Example: { "SOME_ENV=value", "SOME_OTHER_ENV=some_value" } +---@field stdio_sink StdioSink? If provided, will be used to write to stdout and stderr. +---@field cwd string? +---@field on_spawn (fun(handle: luv_handle, stdio: luv_pipe[], pid: integer))? Will be called when the process successfully spawns. +---@field check_executable boolean? Whether to check if the provided command is executable (defaults to true). setmetatable(spawn, { ---@param normalized_cmd string -- cgit v1.2.3-70-g09d2