aboutsummaryrefslogtreecommitdiffstats
path: root/lua/mason-core/spawn.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-08-15 21:03:06 +0200
committerGitHub <noreply@github.com>2022-08-15 21:03:06 +0200
commit3c62386a396ae0c1cd7adbaacc379eb4af072a65 (patch)
tree4d00d20958839a04e6a996c11b97724c762e491a /lua/mason-core/spawn.lua
parentchore: update generated code (#295) (diff)
downloadmason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.gz
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.bz2
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.lz
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.xz
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.tar.zst
mason-3c62386a396ae0c1cd7adbaacc379eb4af072a65.zip
refactor: introduce selene, harden type defs, and use proper EmmyLua syntax (#296)
Diffstat (limited to 'lua/mason-core/spawn.lua')
-rw-r--r--lua/mason-core/spawn.lua14
1 files changed, 7 insertions, 7 deletions
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<string, string>: (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<string, string>? 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