There was an error while loading. Please reload this page.
API 参考 / @142vip/utils / VipExecutor
const VipExecutor: object
const
object
定义于: packages/utils/src/core/exec.ts:221
执行器
commandStandardExecutor: (cmd) => Promise<StandardExecutorResponse>
cmd
Promise
StandardExecutorResponse
标准Linux命令执行器
Command
Promise<StandardExecutorResponse>
execCommand: (cmd, opts?) => Promise<CommandResponse>
opts?
CommandResponse
异步执行命令,并返回结果
Omit<SpawnOptionsWithoutStdio, "stdio" | "cwd">
Omit
SpawnOptionsWithoutStdio
"stdio"
"cwd"
Promise<CommandResponse>
execCommandSync: (cmd, cwd?) => string
cwd?
string
execShell: (commands) => Promise<void>
commands
void
脚本执行器,执行shell命令
string | ShellCommand | ShellCommand[]
ShellCommand
Promise<void>
getCommandTrimResponse: (command) => Promise<null | string>
command
null
获取命令执行的trim操作后的结果
Promise<null | string>