@142vip.utils.变量.VipExecutor - 142vip/core-x GitHub Wiki
API 参考 / @142vip/utils / VipExecutor
constVipExecutor:object
定义于: packages/utils/src/core/exec.ts:221
执行器
commandStandardExecutor: (
cmd) =>Promise<StandardExecutorResponse>
标准Linux命令执行器
- 支持打印结果
- 异步
Promise<StandardExecutorResponse>
execCommand: (
cmd,opts?) =>Promise<CommandResponse>
异步执行命令,并返回结果
Omit<SpawnOptionsWithoutStdio, "stdio" | "cwd">
Promise<CommandResponse>
execCommandSync: (
cmd,cwd?) =>string
string
string
string
execShell: (
commands) =>Promise<void>
脚本执行器,执行shell命令
string | ShellCommand | ShellCommand[]
Promise<void>
getCommandTrimResponse: (
command) =>Promise<null|string>
获取命令执行的trim操作后的结果
string
Promise<null | string>