@ethronpi/exec
Ethron.js plugin for executing commands from the shell.
Developed in Dogma, compiled to JavaScript.
Engineered in Valencia, Spain, EU by EthronLabs.
Use
const exec = require("@ethronpi/exec");
exec task
This task runs a command from the shell:
exec({cmd, bg, status, env, workDir})
exec(cmd)
-
cmd
(string, required). Command to run. -
detach
(bool). Must the command be executed in background? Default:false
. -
status
(number, string or number[]). Exit code(s) to wait. Default:0
. Ifany
, status not considered. -
env
(object). Environment variables. -
workDir
(string). Work directory.
Example:
exec({cmd: "luacheck .", status: 0})
exec({cmd: "luacheck .", status: "any"})
exec({cmd: "luarocks make --local", status: [0, 1]})