21 lines
357 B
Lua
21 lines
357 B
Lua
local core = require "core"
|
|
local process = require "process"
|
|
|
|
---@class M
|
|
local M = {
|
|
name = "shell"
|
|
}
|
|
|
|
function M:run(cmd, opts, name)
|
|
core.log("[jpdebug] Running shell command")
|
|
if cmd then
|
|
local proc = process.start(cmd, opts)
|
|
return proc
|
|
else
|
|
core.error("[jpdebug] command not specified for target %s", name)
|
|
end
|
|
end
|
|
|
|
return M
|
|
|