Added way to have multiple runners and created shell runner
This commit is contained in:
20
runners/shell.lua
Normal file
20
runners/shell.lua
Normal file
@ -0,0 +1,20 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user