justo.plugin.cli
v1.0.0-alpha2.7
Published
Justo plugin for running commands from the shell.
Downloads
5
Readme
justo.plugin.cli
Justo plugin for running commands from the shell. This is local and SSH-compatible.
Developed in Dogma, compiled to JavaScript.
Engineered in Valencia, Spain, EU by Justo Labs.
Use
const cli = require("justo.plugin.cli");
cli task
This task runs a command from the shell:
cli({cmd, bg, status, env, wd})
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. Only when local.wd
orworkDir
(string). Work directory. Only when local.
Example:
cli({cmd: "luacheck .", status: 0})
cli({cmd: "luacheck .", status: "any"})
cli({cmd: "luarocks make --local", status: [0, 1]})