Cleanup & refactor
Some checks failed
Continous Integration / Build (push) Successful in 11s
Continous Integration / Lint (push) Successful in 9s
Continous Integration / Styling (push) Failing after 3s
Continous Integration / Unit Testing (push) Failing after 30s

This commit is contained in:
marked 2025-05-07 00:37:24 +02:00
parent d3b6212463
commit 2a6907434a
50 changed files with 937 additions and 4110 deletions

View file

@ -9,15 +9,15 @@ local task = require("@lune/task")
--- @param cmd string
--- @param options process.SpawnOptions?
--- @return process.SpawnResult
local function start_process(cmd: string, options: process.SpawnOptions?): process.SpawnResult
local function start_process(cmd: string, options: process.ExecOptions?): process.ExecResult
local arguments = string.split(cmd, " ")
local command = arguments[1]
table.remove(arguments, 1)
local opts: process.SpawnOptions = options ~= nil and options or {}
opts.stdio = opts.stdio ~= nil and opts.stdio or "forward"
local opts: process.ExecOptions = options ~= nil and options or {}
opts.stdio = opts.stdio ~= nil and opts.stdio or "forward" :: any
return process.spawn(command, arguments, opts)
return process.exec(command, arguments, opts)
end
--- `task.spawn` a process with the given command and options
@ -27,7 +27,7 @@ end
--- @param cmd string
--- @param options process.SpawnOptions?
--- @return process.SpawnResult
local function spawn_process(cmd: string, options: process.SpawnOptions?)
local function spawn_process(cmd: string, options: process.ExecOptions?)
task.spawn(start_process, cmd, options)
end