(command: string, options: { stdin?: Buffer } = {})
| 60 | } |
| 61 | |
| 62 | export async function shellBufferExec(command: string, options: { stdin?: Buffer } = {}): Promise<BufferExecResult> { |
| 63 | const exec = await plainExec(undefined); |
| 64 | return runCommandNoPty({ |
| 65 | exec, |
| 66 | cmd: '/bin/sh', |
| 67 | args: ['-c', command], |
| 68 | stdin: options.stdin, |
| 69 | output: nullLog, |
| 70 | }).then(res => ({ code: 0, ...res }), error => error); |
| 71 | } |
| 72 | |
| 73 | export interface ExecPtyResult { |
| 74 | cmdOutput: string; |
no test coverage detected